Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream.h>
- #include<stdio.h>>
- #include<conio.h>
- int x;
- float a,b,c,d,e,CwR=50,FF=25,BRGR=35,SFTDRKS=15,SD=15,A,T,Vat,Atp,Cash,Change;
- char z;
- start()
- {
- do
- {
- textbackground(BLUE);
- clrscr();
- textbackground(BLACK|BLINK);
- textcolor(WHITE);
- gotoxy(20,5);
- cprintf("||-----==-----==-----==-----==----||");
- gotoxy(20,6);
- cprintf("||");
- gotoxy(20,7);
- cprintf("||");
- gotoxy(20,8);
- cprintf("||");
- gotoxy(20,9);
- cprintf("||");
- gotoxy(20,10);
- cprintf("||");
- gotoxy(20,11);
- cprintf("||");
- gotoxy(20,12);
- cprintf("||");
- gotoxy(20,13);
- cprintf("||");
- gotoxy(20,14);
- cprintf("||");
- gotoxy(20,15);
- cprintf("||");
- gotoxy(20,16);
- cprintf("||");
- gotoxy(20,17);
- cprintf("||");
- gotoxy(20,18);
- cprintf("||-----==-----==-----==-----==----||");
- gotoxy(54,17);
- cprintf("||");
- gotoxy(54,16);
- cprintf("||");
- gotoxy(54,15);
- cprintf("||");
- gotoxy(54,14);
- cprintf("||");
- gotoxy(54,13);
- cprintf("||");
- gotoxy(54,12);
- cprintf("||");
- gotoxy(54,11);
- cprintf("||");
- gotoxy(54,10);
- cprintf("||");
- gotoxy(54,9);
- cprintf("||");
- gotoxy(54,8);
- cprintf("||");
- gotoxy(54,7);
- cprintf("||");
- gotoxy(54,6);
- cprintf("||");
- gotoxy(54,5);
- cprintf("||");
- gotoxy(30,10);
- cprintf("Good Day Mam/Sir!");
- gotoxy(28,13);
- cprintf("Welcome to Mc Jollibee!\n");
- gotoxy(20,23);
- cprintf("**---==Press space to Continue==---**");
- while (!kbhit());
- return 0;
- }
- while (x!=1);
- }
- main()
- {
- start();
- do
- {
- clrscr();
- textbackground (BLACK);
- textbackground (WHITE);
- textcolor (RED|BLINK);
- gotoxy (35,2);
- cprintf ("MCJOLLIBEE");
- gotoxy (32,3);
- cprintf ("Cashiering System");
- gotoxy (8,5);
- cprintf ("MENU OPTION");
- gotoxy (23,5);
- cprintf("PRODUCT");
- gotoxy (38,5);
- cprintf ("UNIT PRICE");
- gotoxy (53,5);
- cprintf ("Quantity");
- gotoxy (68,5);
- cprintf ("Amount");
- gotoxy (13,7);
- cprintf ("1");
- gotoxy (13,9);
- cprintf ("2");
- gotoxy (13,11);
- cprintf ("3");
- gotoxy (13,13);
- cprintf ("4");
- gotoxy (13,15);
- cprintf ("5");
- gotoxy (22,7);
- cprintf ("Chicken w/ Rice");
- gotoxy (22,9);
- cprintf ("French Fries");
- gotoxy (22,11);
- cprintf ("Burger");
- gotoxy (22,13);
- cprintf ("Sundae");
- gotoxy (22,15);
- cprintf ("Softdrinks");
- gotoxy(40,7);
- cprintf("%.2f",CwR);
- gotoxy(40,9);
- cprintf("%.2f",FF);
- gotoxy(40,11);
- cprintf("%.2f",BRGR);
- gotoxy(40,13);
- cprintf("%.2f",SD);
- gotoxy(40,15);
- cprintf("%.2f",SFTDRKS);
- gotoxy(55,7);
- cprintf("",a);
- cin>>a;
- gotoxy(56,9);
- cprintf("",b);
- cin>>b;
- gotoxy(56,11);
- cprintf("",c);
- cin>>c;
- gotoxy(56,13);
- cprintf("",d);
- cin>>d;
- gotoxy(56,15);
- cprintf("",e);
- cin>>e;
- A=CwR*a;
- gotoxy(68,7);
- cprintf("%.2f",A);
- A=FF*b;
- gotoxy(68,9);
- cprintf("%.2f",A);
- A=BRGR*c;
- gotoxy(68,11);
- cprintf("%.2f",A);
- A=SD*d;
- gotoxy(68,13);
- cprintf("%.2f",A);
- A=SFTDRKS*e;
- gotoxy(68,15);
- cprintf("%.2f",A);
- gotoxy(12,18);
- cprintf("TOTAL:");
- gotoxy(28,18);
- T=CwR*a+FF*b+SD*c;
- cprintf("%.2f",T);
- gotoxy(12,19);
- cprintf("10% VAT:");
- gotoxy(28,19);
- cprintf("+");
- gotoxy(29,19);
- Vat=T*.10;
- cprintf("%.2f",Vat);
- gotoxy(12,20);
- cprintf("Amount to Pay:");
- Atp=T+Vat;
- gotoxy(28,20);
- cprintf("%.2f",Atp);
- gotoxy(12,21);
- cprintf("Cash:");
- gotoxy(28,21);
- cprintf("-");
- gotoxy(29,21);
- cin>>Cash;
- gotoxy(27,22);
- cprintf("---------");
- gotoxy(12,23);
- cprintf("Change:");
- gotoxy(28,23);
- Change=Cash-Atp;
- cprintf("%.2f",Change);
- gotoxy(30,24);
- cout<<"\nDo you want another transaction? \n[y/n]\n";
- cin>>z;
- }
- while(z=='y');
- clrscr();
- gotoxy(36,22);
- cprintf("*-=-=-=-=-=-*");
- gotoxy(28,24);
- cprintf("--= THANK YOU, COME AGAIN! =--");
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement