dilshanlakshitha

project

Dec 30th, 2018
204
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void restaurant()
  2. {
  3. int count=0,z=0,fc[113],answ;
  4. char ans;
  5. int price[113]={245,245,245,245,240,240,240,240,235,235,250,235,235,220,
  6. 215,230,215,240,250,250,250,250,250,250,250,255,245,245,245,245,250,240,
  7. 240,360,290,360,290,370,295,360,290,360,290,250,360,290,360,290,250,370,
  8. 290,360,290,250,250,280,245,290,235,265,240,290,300,256,240,265,270,255,
  9. 255,240,240,235,220,25,30,25,30,35,35,25,30,35,25,35,25,25,30,100,105,105,
  10. 100,105,100,105,125,105,105,100,105,110,115,100,100,100,105,105,105,105,
  11. 125,105,120,120,100};
  12. char food[113][30]={"SHAHI PANEER","KADAI PANEER","CHEESE KORMA",
  13. "MALAI KOFTA","MATAR PANEER","PALAK PANEER","MIX VEG.","ALOO GOBI",
  14. "ALOO JEERA","CHANA MASALA","MATAR MUSHROOM","RAJMA MAKHANI","DAL MAKHANI",
  15. "MIXED RAITA","BUNDI RAITA","PINEAPPLE RAITA","SALAD(GREEN)","DUM ALOO",
  16. "MUSHROOM PANEER","MUTTON MASALA","MUTTON MUGHLAI","MUTTON KORMA",
  17. "MUTTON DO PYAZA","MUTTON SAGH","MUTTON DAHI","MUTTON ROGAN JOSH",
  18. "MUTTON CURRY","KADAI MUTTON","KEEMA LEVER","KEEMA MATAR","KEEMA EGG",
  19. "BRAIN CURRY","EGG CURRY","BUTTER CHICKEN","BUTTER CHICKEN(1/2)",
  20. "KADAI CHICKEN","KADAI CHICKEN(1/2)","BUTTER CHICKEN(BL)",
  21. "BUTTER CHICKEN(BL)(1/2)","CHICKEN MUGHLAI","CHICKEN MUGHLAI(1/2)",
  22. "CHICKEN MASALA","CHICKEN MASALA(1/2)","CHICKEN MASALA(1/4)",
  23. "CHICKEN SAGH","CHICKEN SAGH(1/2)","CHICKEN DAHI","CHICKEN DAHI(1/2)",
  24. "CHICKEN DAHI(1/4)","CHICKEN KORMA","CHICKEN KORMA(1/2)",
  25. "CHICKEN DO PYAZA","CHICKEN DO PYAZA(1/2)","FISH CURRY","CHICKEN CURRY",
  26. "CHICKEN CURRY(1/2)","CHICKEN CURRY(1/4)","CHILLI CHICKEN","TANDOORI ALOO",
  27. "CHICKEN TIKKA","SEEKH KABAB","FISH TIKKA","CHICKEN TANDOORI",
  28. "CHICKEN TANDOORI(1/2)","PANEER TIKKA","CHICKEN SEEKH KABAB",
  29. "CHICKEN HARA KABAB","CHICKEN BIRYANI","MUTTON BIRYANI","PANEER PULAO",
  30. "VEG.PULAO","JEERA RICE","STEAMED RICE","RUMALI ROTI","ROTI","NAN",
  31. "ALOO NAN","PANEER NAN","KEEMA NAN","PARANTHA","ALOO PARANTHA",
  32. "PANEER PARANTHA","PUDINA PARANTHA","BUTTER NAN","LACHCHA PARANTHA",
  33. "MISSI ROTI","KHASTA ROTI","VEG.BURGER","PANEER BURGER","CHEESE SANDWICH",
  34. "VEG.PATTI","CHICKEN PATTI","TEA","COFFEE","COLD COFFEE","PINEAPPLE",
  35. "STRAWBERRY","CHOCOLATE","BLACK FOREST","DOUBLE STORIED","TRIPLE STORIED",
  36. "SOFT CONE","VANILLA","STRAWBERRY","CHOCOLATE","CHOCO CHIPS","MANGO",
  37. "TUTTI FRUITY","LICHI","PISTA BADAM","CHOCOLATE PISTA BADAM","CHOCO DIP",
  38. "CHOCOLATE LICHI"};
  39. clrscr();
  40. screenheader();
  41. printf("\n *********");
  42. printf("\n MENU CARD");
  43. printf("\n *********");
  44. printf("\n\n VEGETARIAN");
  45. for(i=0;i<113;count++,i++)
  46. {
  47. gotoxy(17,count+20);
  48. printf("%d",i+1);
  49. gotoxy(30,count+20);
  50. cputs(food[i]);
  51. gotoxy(55,count+20);
  52. printf("%d",price[i]);
  53. if(count==17)
  54. {
  55. count=0;
  56. printf("\n PRESS ANY KEY TO CONTINUE");
  57. getch();
  58. clrscr();
  59. screenheader();
  60. }
  61. if(i==18)
  62. {
  63. printf("\n\n MUTTON\n");
  64. count +=3;
  65. }
  66. if(i==32)
  67. {
  68. printf("\n\n CHICKEN\n");
  69. count +=3;
  70. }
  71. if(i==57)
  72. {
  73. printf("\n\n BAR-BE-QUE\n");
  74. count +=3;
  75. }
  76. if(i==72)
  77. {
  78. printf("\n\n ROTI-NAN-PARANTHA\n");
  79. count +=3;
  80. }
  81. if(i==91)
  82. {
  83. printf("\n\n BEVERAGES\n");
  84. count +=3;
  85. }
  86. if(i==100)
  87. {
  88. printf("\n\n ICE-CREAMS\n");
  89. count +=3;
  90. }
  91. }
  92. getch();
  93. clrscr();
  94. screenheader();
  95. printf("\n\nPRESS 0 TO GO BACK TO MENU CARD\nPRESS 1 TO CONTINUE ");
  96. scanf("%d",&answ);
  97. switch(answ)
  98. {
  99. case 0:restaurant();
  100. break;
  101.  
  102. case 1 :clrscr();
  103. do
  104. {
  105. printf("ENTER THE FOOD CODE YOU WANT TO HAVE :: ");
  106. scanf("%d",&fc[z]);
  107. z++;
  108. puts("DO YOU WANT MORE(Y/N) ::");
  109. fflush(stdin);
  110. scanf("%c",&ans);
  111. }while ((ans=='y')||(ans=='Y'));
  112. printf("\nEnter your room number:");
  113. scanf("%d",&room);
  114. printf("\nEnter your name:");
  115. fflush(stdin);
  116. gets(name);
  117. if(strcmpi(name,r_cust[room-1])!=0)
  118. {
  119. printf("\nWrong name...:");
  120. getch();
  121. restaurant();
  122. }
  123. getch();
  124. clrscr();
  125. screenheader();
  126. for(i=0;i<z;i++)
  127. {
  128. cputs(food[fc[i]-1]);
  129. printf("\t\t\t%d\n",price[fc[i]-1]);
  130. tot[room-1] +=price[fc[i]-1];
  131. }
  132. printf("TOTAL\t\t\t\t%d",tot[room-1]);
  133. break;
  134.  
  135. default:printf("\nWrong choice entered!!!");
  136. getch();
  137. restaurant();
  138. }
  139. }
RAW Paste Data