Question: #include using namespace std; int main() { int number1 = 0; // The first number int number2 = 0; // The second number int counter

#include using namespace std; int main() { int number1 = 0; // The first number int number2 = 0; // The second number int counter = 0; while (counter <5){ cout<<"Please enter the values of number1 and number2 "<>number1>>number2; cout<<" The sum is : "<

1. How many times does the program above read the values of number1 and number2 and then compute their sum?

2. Modify the above program to run the while loop for 10 interactions.

3. Modify the above program to compute subtraction, multiplication and division.

4. Modify the above program to run the while loop for infinite number of iterations (endless loop).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!