Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int n,input,b=0,c=0,p=0,f=0,count=1;
- again:
- printf("Food Items :\n\t1 . Burger - 120 TK - 1\n\t2 . Fried Chicken - 90 TK - 1\n\t3 . Pizza - 300 TK - 1\n\t4 . French Fries - 60 TK - 1\nChoose One : ");
- scanf("%d",&n);
- if(n==1)
- {
- b++;
- printf("\tPress 0 To Go To Buy Again\n\tPress 1 To Checkout : ");
- scanf("%d",&input);
- if(input==0)
- goto again;
- else
- goto checkout;
- }
- else if(n==2)
- {
- c++;
- printf("\tPress 0 To Go To Buy Again\n\tPress 1 To Checkout : ");
- scanf("%d",&input);
- if(input==0)
- goto again;
- else
- goto checkout;
- }
- else if(n==3)
- {
- p++;
- printf("\tPress 0 To Go To Buy Again\n\tPress 1 To Checkout : ");
- scanf("%d",&input);
- if(input==0)
- goto again;
- else
- goto checkout;
- }
- else if(n==4)
- {
- f++;
- printf("\tPress 0 To Go To Buy Again\n\tPress 1 To Checkout : ");
- scanf("%d",&input);
- if(input==0)
- goto again;
- else
- goto checkout;
- }
- checkout:
- printf("\nItem List :\n");
- if(b!=0)
- {
- printf("\t%d . Burger - %d - %d\n",count,120*b,b);
- count++;
- }
- if(c!=0)
- {
- printf("\t%d . Fried Chicken - %d - %d\n",count,90*c,c);
- count++;
- }
- if(p!=0)
- {
- printf("\t%d . Pizza - %d - %d\n",count,300*p,p);
- count++;
- }
- if(f!=0)
- {
- printf("\t%d . French Fry - %d - %d\n",count,60*f,f);
- }
- printf("\n\tTotal Bill : %d Taka\n",(120*b)+(90*c)+(300*p)+(60*f));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment