Rewrite the following code, replacing the do-while loop with a while loop. When you do this you will no longer need an if statement.
int number;
cout << "Enter an even number: ";
do
{ cin >> number;
if (number % 2 != 0)
cout << "Number must be even. Reenter number: ";
} while (number % 2 != 0);
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.