Problem

In the following code, correct any errors that would prevent the program from compiling...

In the following code, correct any errors that would prevent the program from compiling or running:

include

main ()

{

int num1, num2;

bool found;

cout << "Enter two integers: ;

cin >> num1 >> num2;

cout << endl;

if (num1 >= num2) && num2 > 0

switch (num % num2)

{

case 1

found = (num / num2) >= 6;

break;

case 2: case 3

num1 = num2 / 2;

brake;

default:

num2 = num1 * num2;

}

else

{

found = (2 * num2 < num1);

if found

cin >> num2

num 1 = num2 – num1;

temp = (num1 + num2) / 10;

if num2

{

num1 = num2;

num2 = temp;

}

cout << num1 << " " << num2 << endl;

}

After correcting the code, answer the following questions. (If needed, insert prompt lines to inform the user for the input.)

a. What is the output if the input is 10      8    6?

b. What is the output if the input is 4    9    11?

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT