Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void payment(float money)
- {
- scr();
- back_option:
- line(10);tab(20);print("How you pay this money :"); line (2);system("color 0F");
- line(10);tab(70);print("1. Cash");line(2);
- line(10);tab(20);print("2. Credit Card");line(2);
- int choose;
- float taka;
- line(5);tab(3); scanf("%d",&choose);line(2);
- if(choose==1)
- {
- scr();
- give:
- line(5);tab(5);print("How much you give: ");line(2);system("color 69");
- line(5);tab(5);scanf("%f",&taka);line(2);
- if(money>taka)
- {
- scr();
- line(10);tab(10);printf("please give %.2f some also",money-taka);line(2);
- goto give;
- }
- else
- {
- scr();
- line(5);tab(5);printf("you paben %.2f",taka-money);line(2);
- }
- }
- else if(choose==2)
- {
- scr();
- int card_num[20],i=0;
- line(5);tab(5);print("please give your card number :");line(2);
- line(5);tab(10); scanf("%d",&card_num[i]);line(2);
- credit_card[i]=card_num[i];
- i++;
- scr();
- line(2);tab(2);printf("Thank you sir");line(2);
- }
- else
- {
- line(10);tab(5);printf("please enter correct password sir:");line(2);
- goto back_option;
- }
- }
- int orderlist()
- {
- int foodchoice,much,i,j,k;
- food_choice :
- line(2); print("Which product !");line(3);
- tab(5);scanf("%d",&foodchoice);
- i=count();
- if(foodchoice>=1 && foodchoice<=1)
- {
- line(2);tab(2);print("How much you need :");
- tab(3);scanf("%d",&much);
- k= total_money(foodchoice,much);
- payment(k);
- return k;
- }
- else
- {
- scr();
- line(5);tab(3);printf("Enter correct item number please :");line(2);
- foodlist();
- goto food_choice;
- }
- }
- /*void insertfood(int fooddata,char addfood[30],float food price,int foodstock)
- {
- node *temp,box;
- temp=(node*)malloc(sizeof(node));
- temp->data=fooddata;
- temp->foodname=addfood;
- temp->stock=foodstock;
- temp->price=foodprice;
- temp->next=NULL;
- box=temp;
- head->next=box;
- box->next=NNULL;
- }*/
- void windows()
- {
- system("title .....CODE BY RAKIB.....");
- ststem("mode con: lines=35 cols=120");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement