Advertisement
sahnaj

food project

Dec 8th, 2019
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. void payment(float money)
  2. {
  3. scr();
  4. back_option:
  5. line(10);tab(20);print("How you pay this money :"); line (2);system("color 0F");
  6. line(10);tab(70);print("1. Cash");line(2);
  7. line(10);tab(20);print("2. Credit Card");line(2);
  8.  
  9. int choose;
  10. float taka;
  11.  
  12. line(5);tab(3); scanf("%d",&choose);line(2);
  13. if(choose==1)
  14. {
  15. scr();
  16. give:
  17. line(5);tab(5);print("How much you give: ");line(2);system("color 69");
  18. line(5);tab(5);scanf("%f",&taka);line(2);
  19. if(money>taka)
  20. {
  21. scr();
  22. line(10);tab(10);printf("please give %.2f some also",money-taka);line(2);
  23. goto give;
  24. }
  25. else
  26. {
  27. scr();
  28. line(5);tab(5);printf("you paben %.2f",taka-money);line(2);
  29.  
  30. }
  31.  
  32. }
  33. else if(choose==2)
  34. {
  35. scr();
  36. int card_num[20],i=0;
  37. line(5);tab(5);print("please give your card number :");line(2);
  38. line(5);tab(10); scanf("%d",&card_num[i]);line(2);
  39. credit_card[i]=card_num[i];
  40. i++;
  41. scr();
  42. line(2);tab(2);printf("Thank you sir");line(2);
  43.  
  44. }
  45. else
  46. {
  47.  
  48. line(10);tab(5);printf("please enter correct password sir:");line(2);
  49. goto back_option;
  50. }
  51. }
  52.  
  53.  
  54.  
  55. int orderlist()
  56. {
  57. int foodchoice,much,i,j,k;
  58. food_choice :
  59. line(2); print("Which product !");line(3);
  60. tab(5);scanf("%d",&foodchoice);
  61. i=count();
  62. if(foodchoice>=1 && foodchoice<=1)
  63. {
  64. line(2);tab(2);print("How much you need :");
  65. tab(3);scanf("%d",&much);
  66. k= total_money(foodchoice,much);
  67. payment(k);
  68. return k;
  69. }
  70. else
  71. {
  72. scr();
  73. line(5);tab(3);printf("Enter correct item number please :");line(2);
  74. foodlist();
  75. goto food_choice;
  76. }
  77. }
  78. /*void insertfood(int fooddata,char addfood[30],float food price,int foodstock)
  79. {
  80. node *temp,box;
  81. temp=(node*)malloc(sizeof(node));
  82. temp->data=fooddata;
  83. temp->foodname=addfood;
  84. temp->stock=foodstock;
  85. temp->price=foodprice;
  86. temp->next=NULL;
  87. box=temp;
  88. head->next=box;
  89. box->next=NNULL;
  90. }*/
  91.  
  92.  
  93.  
  94. void windows()
  95. {
  96. system("title .....CODE BY RAKIB.....");
  97. ststem("mode con: lines=35 cols=120");
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement