Advertisement
sifat3d

Restaurant Menu EASY C

Jun 9th, 2015
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.76 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     char choice;
  6.     printf("Please enter your choice a)Burger OR b)Sandwich OR c)Juice\n\t\t\t\t");
  7.     scanf("%c",&choice);
  8.  
  9.     if(choice<97){choice=choice+32;}
  10.  
  11.     switch(choice)
  12.     {
  13.     case 'a':
  14.             printf("\tYou have chosen Burger, Thank you.");
  15.             break;
  16.     case 'b':
  17.             printf("\tYou have chosen Sandwich, Thank you.");
  18.             break;
  19.     case 'c':
  20.             printf("\tYou have chosen Juice, Thank you.");
  21.             break;
  22.     case 'z':
  23.             printf("\tYou have chosen 10, it is a HIDDEN MEAL, Thank you.");
  24.             break;
  25.     default:
  26.             printf("\tYou did not order any of the above three, NO Thank you.");
  27.             break;
  28.     }
  29.  
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement