My site Saturday, 2018-07-21, 8:45 AM
Main | Registration | Login Welcome Guest | RSS
Site menu

Our poll
Which anime is the best
Total of answers: 29

Statistics

Total online: 1
Guests: 1
Users: 0

Main » 2012 » January » 26 » Menu
2:44 PM
Menu
gotoxy()
switch
do while
int main()
{ mainMenu();
 return 0;
}
void mainMenu()
{int choice;
char ans;
do{     clrscr();
        gotoxy(35,8);
  printf("\n 1. item 1");
printf("\n 2. item 2");
printf("\n 3. item 3");
printf("\n 4. item 4");
printf("\n 5. Quit");
printf("\n Please select ");
scanf("%d", &choice);
switch(choice)
  { case 1:functionCall();
break;
  case 2:
  case 3: 
  case 4:
 case 5:printf("\n Are you sure you want to quit Y/ N");
 ans =toupper(getch());
         if(ans=='N')
     { choice =1;
     }
         break;
 default:printf("\n Unknow choice. Please try again ");
}
  gotoxy(2,21);
  printf("\n Press any key to continue");
  getch();
  
     }while(choice !=5);
Views: 332 | Added by: fawkes | Rating: 0.0/0
Total comments: 0
Name *:
Email *:
Code *:
Login form

Search

Calendar
«  January 2012  »
SuMoTuWeThFrSa
1234567
891011121314
15161718192021
22232425262728
293031

Entries archive

Site friends
  • Create your own site

  • Copyright MyCorp © 2018