void main (void)
{
/****** Variables locales (déclaration et initialisation) ******/
int inChoix = 0;
/****** Blocs d'instructions ******/
cout << "MENU PRINCIPAL" << endl;
cout << "**************" << endl << endl;
cout << "[ 1 ] OPTION No 1" << endl;
cout << "[ 2 ] OPTION No 2" << endl;
cout << "[ 3 ] OPTION No 3" << endl;
cout << "[ 4 ] OPTION No 4" << endl;
cout << "[ 5 ] OPTION No 5" << endl << endl;
cout << "[ ESC ] Quitter le programme" << endl;
cin >> inChoix; // L'utilisateur entre son choix.
switch (inChoix)
{
case 1:
cout << "Vous avez choisi l'OPTION No 1" << endl;
system ("PAUSE");
break;
case 2
:
cout << "Vous avez choisi l'OPTION No 2" << endl;
system ("PAUSE");
break;
case 3:
cout << "Vous avez choisi l'OPTION No 3" << endl;
system ("PAUSE");
break;
case 4:
cout << "Vous avez choisi l'OPTION No 4" << endl;
system ("PAUSE");
break;
case 5:
cout << "Vous avez choisi l'OPTION No 5" << endl;
system ("PAUSE");
break;
default:
break;
}
}
Partager