Hey, I got bored so decided to make this pointless program but am a bit confuzzled..
#include <iostream>
using namespace std;
int main()
{
int decision;
do
{
system("cls");
cout << "Welcome to my pointless menu!" << endl;
cout << "1 : Do Nothing." << endl << "2 : View Authors Details." << endl;
cout << "3 : Quit" << endl << endl;
cout << "Choose Your Decision : ";
cin >> decision;
}
while( decision == 1 || decision < 1 || decision > 3 );
switch( decision )
{
case 2:
system("cls");
cout << "NAME : CRAIG AYRE" << endl;
cout << "SEX : MALE" << endl;
cout << "AGE : 14" << endl << endl;
cout << "1 : Do Nothing." << endl << "2 : Return To Main Menu";
cout << endl << "3 : Quit";
cout << "Choose Your Decision : ";
cin >> decision;
cin.get();
break;
case 3:
{ }
break;
}
do
{
system("cls");
cout << "Welcome to my pointless menu!" << endl;
cout << "1 : Do Nothing." << endl << "2 : View Authors Details." << endl;
cout << "3 : Quit" << endl << endl;
cout << "Choose Your Decision : ";
cin >> decision;
}
while( decision == 2 );
cin.get();
return 0;
}
I've got the basic idea just I just thought, If I kept doing it i would have unlimited do loops, because the user could go view authors details go main menu.. go authors details.. etc etc.. please help :D