nguyentruong98

Untitled

Dec 9th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.11 KB | None | 0 0
  1. void printmenu()
  2. {
  3.       printf("1. Read input from text file\n");
  4.       printf("2. Print total number of gates\n");
  5.       printf("3. Print total number of isles\n");
  6.       printf("4. Find total number of direct and undirect connected cells of a walkable cell\n");
  7.       printf("5. Find whether or not can the treasure cell reachable\n");
  8.       printf("6. Exit program\n");
  9. }
  10. int main()
  11. {
  12.       int a;
  13.       int thoat = 0;
  14.       while (thoat == 0)
  15.       {
  16.             printmenu();
  17.             scanf("%d", &a);
  18.             switch (a)
  19.             {
  20.             case 1:
  21.                   printf("mot\n");
  22.                   break;
  23.             case 2:
  24.                   printf("hai\n");
  25.                   break;
  26.             case 3:
  27.                   printf("ba\n");
  28.                   break;
  29.             case 4:
  30.                   printf("bon\n");
  31.                   break;
  32.             case 5:
  33.                   printf("nam\n");
  34.                   break;
  35.             case 6:
  36.                   printf("Exit\n");
  37.                   thoat = 1;
  38.                   break;
  39.             default:
  40.                   break;
  41.             }
  42.       }
  43.       return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment