Advertisement
fernandezekiel

Untitled

Jan 21st, 2013
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.61 KB | None | 0 0
  1. #include<iostream.h>
  2. #include<stdio.h>>
  3. #include<conio.h>
  4.  
  5. int x;
  6. float a,b,c,d,e,CwR=50,FF=25,BRGR=35,SFTDRKS=15,SD=15,A,T,Vat,Atp,Cash,Change;
  7. char z;
  8.  
  9. start()
  10. {
  11.  
  12. do
  13. {
  14. textbackground(BLUE);
  15. clrscr();
  16. textbackground(BLACK|BLINK);
  17. textcolor(WHITE);
  18. gotoxy(20,5);
  19. cprintf("||-----==-----==-----==-----==----||");
  20. gotoxy(20,6);
  21. cprintf("||");
  22. gotoxy(20,7);
  23. cprintf("||");
  24. gotoxy(20,8);
  25. cprintf("||");
  26. gotoxy(20,9);
  27. cprintf("||");
  28. gotoxy(20,10);
  29. cprintf("||");
  30. gotoxy(20,11);
  31. cprintf("||");
  32. gotoxy(20,12);
  33. cprintf("||");
  34. gotoxy(20,13);
  35. cprintf("||");
  36. gotoxy(20,14);
  37. cprintf("||");
  38. gotoxy(20,15);
  39. cprintf("||");
  40. gotoxy(20,16);
  41. cprintf("||");
  42. gotoxy(20,17);
  43. cprintf("||");
  44.  
  45.  
  46. gotoxy(20,18);
  47. cprintf("||-----==-----==-----==-----==----||");
  48. gotoxy(54,17);
  49. cprintf("||");
  50. gotoxy(54,16);
  51. cprintf("||");
  52. gotoxy(54,15);
  53. cprintf("||");
  54. gotoxy(54,14);
  55. cprintf("||");
  56. gotoxy(54,13);
  57. cprintf("||");
  58. gotoxy(54,12);
  59. cprintf("||");
  60. gotoxy(54,11);
  61. cprintf("||");
  62. gotoxy(54,10);
  63. cprintf("||");
  64. gotoxy(54,9);
  65. cprintf("||");
  66. gotoxy(54,8);
  67. cprintf("||");
  68. gotoxy(54,7);
  69. cprintf("||");
  70. gotoxy(54,6);
  71. cprintf("||");
  72. gotoxy(54,5);
  73. cprintf("||");
  74. gotoxy(30,10);
  75. cprintf("Good Day Mam/Sir!");
  76. gotoxy(28,13);
  77. cprintf("Welcome to Mc Jollibee!\n");
  78. gotoxy(20,23);
  79. cprintf("**---==Press space to Continue==---**");
  80. while (!kbhit());
  81. return 0;
  82. }
  83. while (x!=1);
  84.  
  85. }
  86.  
  87.  
  88.  
  89. main()
  90. {
  91. start();
  92. do
  93. {
  94.   clrscr();
  95.  textbackground (BLACK);
  96.  textbackground (WHITE);
  97.  textcolor (RED|BLINK);
  98.  gotoxy (35,2);
  99.  cprintf ("MCJOLLIBEE");
  100.  gotoxy (32,3);
  101.  cprintf ("Cashiering System");
  102.  gotoxy (8,5);
  103.  cprintf ("MENU OPTION");
  104.  gotoxy (23,5);
  105.  cprintf("PRODUCT");
  106.  gotoxy (38,5);
  107.  cprintf ("UNIT PRICE");
  108.  gotoxy (53,5);
  109.  cprintf ("Quantity");
  110.  gotoxy (68,5);
  111.  cprintf ("Amount");
  112.  
  113.  
  114.  gotoxy (13,7);
  115.  cprintf ("1");
  116.  gotoxy (13,9);
  117.  cprintf ("2");
  118.  gotoxy (13,11);
  119.  cprintf ("3");
  120.  gotoxy (13,13);
  121.  cprintf ("4");
  122.  gotoxy (13,15);
  123.  cprintf ("5");
  124.  
  125.  gotoxy (22,7);
  126.  cprintf ("Chicken w/ Rice");
  127.  gotoxy (22,9);
  128.  cprintf ("French Fries");
  129.  gotoxy (22,11);
  130.  cprintf ("Burger");
  131.  gotoxy (22,13);
  132.  cprintf ("Sundae");
  133.  gotoxy (22,15);
  134.  cprintf ("Softdrinks");
  135.  
  136.  
  137.  
  138. gotoxy(40,7);
  139. cprintf("%.2f",CwR);
  140. gotoxy(40,9);
  141. cprintf("%.2f",FF);
  142. gotoxy(40,11);
  143. cprintf("%.2f",BRGR);
  144. gotoxy(40,13);
  145. cprintf("%.2f",SD);
  146. gotoxy(40,15);
  147. cprintf("%.2f",SFTDRKS);
  148.  
  149. gotoxy(55,7);
  150. cprintf("",a);
  151. cin>>a;
  152. gotoxy(56,9);
  153. cprintf("",b);
  154. cin>>b;
  155. gotoxy(56,11);
  156. cprintf("",c);
  157. cin>>c;
  158. gotoxy(56,13);
  159. cprintf("",d);
  160. cin>>d;
  161. gotoxy(56,15);
  162. cprintf("",e);
  163. cin>>e;
  164.  
  165. A=CwR*a;
  166. gotoxy(68,7);
  167. cprintf("%.2f",A);
  168. A=FF*b;
  169. gotoxy(68,9);
  170. cprintf("%.2f",A);
  171. A=BRGR*c;
  172. gotoxy(68,11);
  173. cprintf("%.2f",A);
  174. A=SD*d;
  175. gotoxy(68,13);
  176. cprintf("%.2f",A);
  177. A=SFTDRKS*e;
  178. gotoxy(68,15);
  179. cprintf("%.2f",A);
  180.  
  181.  
  182.  
  183.  
  184.  
  185. gotoxy(12,18);
  186. cprintf("TOTAL:");
  187.  
  188. gotoxy(28,18);
  189. T=CwR*a+FF*b+SD*c;
  190. cprintf("%.2f",T);
  191.  
  192. gotoxy(12,19);
  193. cprintf("10% VAT:");
  194.  
  195. gotoxy(28,19);
  196. cprintf("+");
  197. gotoxy(29,19);
  198. Vat=T*.10;
  199. cprintf("%.2f",Vat);
  200.  
  201. gotoxy(12,20);
  202. cprintf("Amount to Pay:");
  203. Atp=T+Vat;
  204.  
  205. gotoxy(28,20);
  206. cprintf("%.2f",Atp);
  207.  
  208. gotoxy(12,21);
  209. cprintf("Cash:");
  210.  
  211. gotoxy(28,21);
  212. cprintf("-");
  213.  
  214. gotoxy(29,21);
  215. cin>>Cash;
  216.  
  217. gotoxy(27,22);
  218. cprintf("---------");
  219.  
  220. gotoxy(12,23);
  221. cprintf("Change:");
  222.  
  223. gotoxy(28,23);
  224. Change=Cash-Atp;
  225. cprintf("%.2f",Change);
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233. gotoxy(30,24);
  234. cout<<"\nDo you want another transaction? \n[y/n]\n";
  235. cin>>z;
  236.  
  237. }
  238. while(z=='y');
  239.  
  240.  
  241. clrscr();
  242. gotoxy(36,22);
  243. cprintf("*-=-=-=-=-=-*");
  244.  
  245. gotoxy(28,24);
  246. cprintf("--= THANK YOU, COME AGAIN! =--");
  247.  
  248.  getch();
  249.  return 0;
  250.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement