Skip to content

Instantly share code, notes, and snippets.

@SohanChy
Last active August 29, 2015 14:23
Show Gist options
  • Save SohanChy/f24f044ae090de24d4eb to your computer and use it in GitHub Desktop.
Save SohanChy/f24f044ae090de24d4eb to your computer and use it in GitHub Desktop.
Restaurant Menu EASY C
#include <stdio.h>
int main()
{
char choice;
printf("Please enter your choice a)Burger OR b)Sandwich OR c)Juice\n\t\t\t\t");
scanf("%c",&choice);
if(choice<97){choice=choice+32;}
switch(choice)
{
case 'a':
printf("\tYou have chosen Burger, Thank you.");
break;
case 'b':
printf("\tYou have chosen Sandwich, Thank you.");
break;
case 'c':
printf("\tYou have chosen Juice, Thank you.");
break;
case 'z':
printf("\tYou have chosen 10, it is a HIDDEN MEAL, Thank you.");
break;
default:
printf("\tYou did not order any of the above three, NO Thank you.");
break;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment