#include<stdio.h>
int printMenu()
{
int response;
fprintf(stdout,"\n\n\n *********************************************\n");
fprintf(stdout," FOOD COURT \n ");
fprintf(stdout," *********************************************\n\n\n");
fprintf(stdout," Welcome to the Food court \n\n");
fprintf(stdout," Make your selection from the given MENU below:\n\n\n");
fprintf(stdout," 1. Thums up 60.00 \n");
fprintf(stdout," 2. Sprite 60.00 \n");
fprintf(stdout," 3. Coke 60.00 \n");
fprintf(stdout," 4. Regular Cheeseburger 45.00 \n");
fprintf(stdout," 5. Fish Sandwich 70.00 \n");
fprintf(stdout," 6. French fries 55.00 \n");
fprintf(stdout," 7. Candies 40.00 \n");
fprintf(stdout," 8. Dairy milk 50.00 \n");
fprintf(stdout," 9. Milky bar 45.00 \n");
fprintf(stdout,"\n\n *********************************************\n\n");
fprintf(stdout,"Enter the choice from FOOD COURT Menu \n\n");
fscanf(stdin, "%d", &response);
return response;
}
int main()
{
int s,r;
float p, x;
int response;
int sub;
response = printMenu();
printf("How many orders of item number %d would you like?\n", response);
scanf("%d", &s);
switch (response){
case 1:
printf("You have ordered %d order(s) of the Thums up\n");
p=s * 60.00;
printf("Net Ordered Amount: %.2f\n\n", p);
break;
case 2:
printf("You have ordered %d order(s) of the Sprite \n", s);
p=s*60.00;
printf("Net Ordered Amount: %.2f\n\n", p);
break;
case 3:
printf("You have ordered %d order(s) of the Coke\n", s);
p=s*60.000;
printf("Net Ordered Amount: %.2f\n\n", p);
break;
case 4:
printf("You have ordered %d order(s) of the Regular Cheeseburger\n", s);
p=s*45;
printf("Net Ordered Amount: %.2f\n\n", p);
break;
case 5:
printf("You have ordered %d order(s) of the Fish Sandwich\n", s);
p=s*70;
printf("Net Ordered Amount: %.2f\n\n", p);
break;
case 6:
printf("You have ordered %d order(s) of the French fries \n", s);
p=s*55;
printf("Net Ordered Amount: %.2f\n\n", p);
break;
case 7:
printf("You have ordered %d order(s) Candies \n", s);
p=s*40;
printf("Net Ordered Amount: %.2f\n\n", p);
break;
case 8:
printf("You have ordered %d order(s) Dairy Milk \n", s);
p=s*50;
printf("Net Ordered Amount: %.2f\n\n", p);
break;
case 9:
printf("You have ordered %d order(s) Milky bar\n", s);
p=s*45;
printf("Net Ordered Amount: %.2f\n\n", p);
break;
default:
printf(" \n\nError: This is not on the menu. \n");
break;
}
printf("Do you have anything else\n1.Yes\n2.No\n\n");
scanf("%d",&r);
if(r==1)
{
}
else
printf("your Total Amount:%.2f\n\n",p);
x=p*1.13;
printf("Please pay %.2f\n\n",x);
printf("Service Tax & VAT TAX of 1.13 was included.\n\n\n\n");
printf(" Thank you for eating at FOOD COURT\n\n");
fprintf(stdout," *********************************************\n");
fprintf(stdout," VISIT AGAIN \n ");
fprintf(stdout," *********************************************\n\n");
}