C++

Asked • 06/06/21

C++ program has errors - fix them

The following C++ program has errors at the lines marked a,b,c,d, and e.

For each answer write a single line of C++ that fixes all errors in the corresponding line.

Do not change anything that is correct.



#Include // line a

using namespace std;

int main { // line b

int x = 1, y = 2;

for (int x == 1; x < 10; x++); // line c

cout << y % y endl; // line d

return; // line e

}

1 Expert Answer

By:

Ralph W. answered • 06/06/21

Tutor
4.9 (144)

Why I Am the Right Choice to Teach and Tutor C++

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.