Unnamed
public text v1 · immutableint menu(int menuChoice);
{
system("cls");
cout<<"Mathematical Operations Menu\n"
<<"1) Calculate the FACTORIAL of a number\n"
<<"2) Calculate M raised to the Nth POWER\n"
<<"3) Calculate the LEAST COMMON MULTIPLE of two numbers\n"
<<"4) Calculate the GREATEST COMMON DIVISOR of two numbers\n\n"
<<"5) Exit\n\n"
<<"Enter your choice: ";
cin>>menuChoice;
while(menuChoice > 0 && menuChoice <= 5)
{
cout<<"\nError: Invalid Entry, Try again.";
cin>>menuChoice;
}
return menuChoice;
}