Look at where the points are below to see where I need help.
Write a program that will help people practice addition and subtraction. The program will display the following menu in a loop:
Please enter your choice:
After the user enters A (a), S (s), or Q (q) the program will generate 2 random numbers between 0 and 100 and ask the user the appropriate question:
How much is 23 + 14? or How much is 23 - 14? depending on whether they wanted to do addition or subtraction. The program will keep the user in a loop until they have answered the question correctly. After the user has answered the question correctly display a message to the user telling them they got the question right.
The loop with the menu will continue to run until the user enters Q or q.
5 points -the loop that will display the menu and repeat as long as the user doesn't enter 'Q' or 'q'.
4 points - Accepting both 'A' and 'a', 'S' and 's', and 'Q' and 'q' to run the loop.
3 points -generating the two random numbers and storing them in variables.
Did i do this right?3 points - using srand() to change the series of random numbers generated. srand() should only be called once.
How do I do this??? 2 points - using function time() to get the clock time for srand().
How do i keep it to loop? 5 points - writing the loop to compare the computer generated answer to the operation to the value entered by the user and looping as long as the computer answer does not match the user's answer.
3 points - Displaying the messages that the user answered the question incorrectly or correctly.
I have so far.
using namespace std;
int main ()
cout << "A addition" << endl;
cout << "S subtraction" << endl;
cout << "Q quit" << endl;
cout << "Please enter your choice: ";
cin >> choice;
int num1 = rand() % 100 + 1;
cout << "How much is " << num1;