Advertisement
TrungVan1519

Untitled

Nov 23rd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. Bai1()
  4. {
  5.     printf ("Hello World");
  6. }
  7. Bai2()
  8. {
  9.     printf ("Goodbye");
  10. }
  11. debai()
  12. {
  13.     int a;
  14.     printf ("Ban chon bai: ");
  15.     scanf ("%d", &a);
  16.     switch (a)
  17.     {
  18.         case 1:
  19.             {
  20.                 Bai1();
  21.                 break;
  22.             }
  23.         case 2:
  24.             {
  25.                 Bai2();
  26.                 break;
  27.             }
  28.         case 3:
  29.             {
  30.                 exit(0);
  31.             }
  32.         default:
  33.             printf ("Ban nhap sai");
  34.             break;
  35.     }
  36. }
  37. int main ()
  38. {
  39.         debai();
  40.         return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement