Find the errors
A) // This code should display the sum of two numbers.
int choice, num1, num2;
do
{
cout << "Enter a number: ";
cin >> num1;
cout << "Enter another number: ";
cin >> num2;
cout << "Their sum is " << (num1 + num2) << endl;
cout << "Do you want to do this again?\n";
cout << "1 = yes, 0 = no\n";
cin >> choice;
} while (choice = 1)
B) // This code should display the sum of the numbers 1 - 100.
int count = 1, total;
while (count <= 100)
total += count;
cout << "The sum of the numbers 1 - 100 is ";
cout << total << endl;
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.