Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Is there anyway I can display this menu without using cout? My professor said to

ID: 3822651 • Letter: I

Question

Is there anyway I can display this menu without using cout? My professor said to put the menu in a function but do not use cout to display it.

void mainmenu(){

   cout << "Welcome to Calculator Project!" << endl;
cout << "*******************************" << endl;


cout << "A) Addition" << endl << "B) Subtraction" << endl << "C) Multiplication" << endl << "D) Division" << endl << "E) Roots (only enter positive number)" << endl <<
"F) Power (only enter positive number)" << endl << "G) Percentage" << endl << "H) Least Common Multiplier" << endl << "I) Greatest Common Divisor" << endl <<
"J) Modulus" << endl << "K) Quit" << endl;

cout << "*******************************" << endl;

}

Explanation / Answer

Hi Friend, you can user many other function to print on console:

fprintf(stdout, "Welcome to Calculator Project! ");

printf( "Welcome to Calculator Project! ")

fwrite(str, sizeof(*str), strlen(str), stdout);

Please let me know in case of more information needed.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote