It's been awhile since I've worked with loops and I'm lost. I have two events, based on user input, that will happen. I think it is just placement of the breaks, but take a look.
What I want happen is when M or m is pressed, the (operation = 1) loop will break and go back to the "menu" (the first while loop). If E or e is pressed, then the program should exit. Please help, thanks!
#include<iostream>
#include<stdlib.h>
int main()
{
char menuOrExit;
while(~~~)
{
while (operation = 1)
{
~~~~~~~~~~
~~~~~~~~~~
cout << "Go back to the menu (M) or exit (E): ";
cin >> menuOrExit;
if (menuOrExit != 'M' || menuOrExit != 'm')
{
cout << endl;
break;
}
if (menuOrExit != 'E' || menuOrExit != 'e')
{
exit(1);
}
}
}
return 0;
}