FINAL PROJECT
Hello, I have already completed this program, it runs as I want it to, however I would like to use while so it gives the user a chance to press "Y" in order to re run the program instead of having to restart it entirely, can I please get help? sorry if this seems too easy it is my first program and C++ is a PAIN FOR MEEE! //C++ Program FINAL PROJECT //Gabriel Reyes, February 5, 2022 CIS-5 #include<iostream> #include<cmath> #include<ctime> //v1.2 using namespace std; int main() { srand(time(NULL)); //v1.2 char sym_choice; //Symbol Choice int one, two; char A_WAIT; //Answer to match with already generated problem char programerChoice; cout << "\tHello, please Select A symbol to\n"; cout << "\tsolve a random math problem: \n"; cout << "\t(+,-,*,/)\n\n"; cout << "\tENTER YOUR CHOICE: "; cin >> sym_choice; // if (sym_choice == ('+'|| '-'|| '*'|| '/')) int answer = 0; bool CORRECT = false; one = rand() % 500 + 1; two = rand() % 500 + 1; std::cout << "What is " << one << " " << sym_choice << " " << two << "? "; cin >> A_WAIT; switch (sym_choice) { case '+': answer = one + two; CORRECT = true; break; case '-': answer = one - two; CORRECT = true; break; case '*': answer = one * two; CORRECT = true; break; case '/': answer = one / two; CORRECT = true; break; default: { cout << "SORRY, PLEASE ONLY ENTER A SYMBOL LISTED ABOVE!"; return 1; } } if (CORRECT == true) { cout << answer << "\n\nIf your Answer Matches then Nice job!" << endl; } cout << "Press 'Y or y' for repeat again, otherwise press any character: "; cin >> programerChoice; while (