Write a complete c program that prompts the user to enter a


Program 1: Write a complete C++ program that prompts the user to enter a test score. The test score must be greater than or equal to 0 and less than or equal to 100. If the user enters a test score that is not within the range, prompt the user to re-enter the score. Use a do...while loop.

Program 2: Given the following program. Write a while loop and a do...while loop that have the same output.

#include

using namespace std;

int main()

{

            int num = 0, sum = 0;

            for(num = 1; num < 10; num++)

                sum += num;

            cout << "sum = " << sum << endl;

            cout << "Press any key to exit the program.";

            cin.ignore(1);

            return 0;

}

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a complete c program that prompts the user to enter a
Reference No:- TGS0947023

Expected delivery within 24 Hours