Hello Guys....I want to share this billing system that I made so copy paste the code and edit what you want!!
I hope it will help to you!!
Screen shot:
Code:
//Made by : ALFRED C. DRIO
//Billing System For Chowking
//For more projects visit us: http://info-zone4you.blogspot.com/
#include<stdio.h>
#include<process.h>
#include<string.h>
#include<conio.h>
#include<dos.h>
void order();
void lo();
char hdr[]
="=========================================================================
=======\n\n\t\t\t\t Welcome to Chowking!\n\t\t\t\t Billing System\n\t\t
\t\t A.D. Software Inc.\n\n
\n=========================================================================
=======\n";
void lo()
{
clrscr();
int x=20;
gotoxy(19,19);printf("Loading...");
for(int a=0;a<=35;a++)
{
gotoxy(x,23);delay(100);printf("Ü");
x++;
}
order();
}
void main()
{
clrscr();
int choice;
printf("%s",hdr);
printf("1 - Make an order.\n");
printf("2 - Exit.\n\n");
printf("Enter your choice (1-2): ");
scanf("%d",&choice);
switch (choice)
{
case 1:lo();break;
case 2:exit(1);
}}
void order()
{
int choose;
int b;
int payment;
int i;
int ssl=0;
int bfl=0;
int s=0;
int pc=0;
int coker=0,cokel=0;
int itr=0,itl=0;
int minr=0,minl=0;
char name[25];
float c;
float e=0;
float f;
float orig;
float total=0;
float vat;
float total_vat=0;
float change;
float op=0;
float money;
char d;
char dt;
clrscr();
printf("%s",hdr);
printf("Enter your name: ");
scanf("%s",&name);
menu:
printf("\t\t\t\t Place your order.\n\n");
printf
("=========================================================================
=======\n");
printf("\tNo.\tMeal\t\t\t\tPrice\t\tAvailable:\n\n");
printf("\t(1) \tSweet & Sour pork Lauriat:\tPhp125.00\t\t\n");
printf("\t(2) \tBreaded Fish Lauriat: \tPhp125.00\t\t\n");
printf("\t(3) \tSiomai: \tPhp29.00\t\t\n");
printf("\t(4) \tPancit Canton: \tPhp65.00\t\t\n");
printf("\t(5) \tDrinks available:\n\t\t\t>Coke\n\t\t\t>Iced Tea\n\t\t
\t>Mineral Water\n");
printf
("=========================================================================
=======\n");
printf("Press your Order:\t");
scanf("%d",&choose);
printf
("=========================================================================
======\n");
switch(choose)
{
case 1:
{
printf("\n\tSweet & Sour pork Lauriat (Php125.00 each)\n\tHow many
order do you want?:\t");
scanf("%d",&b);
orig=125;
vat=(b*orig)*.10;
e=vat;
ssl=ssl+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tSweet & Sour pork Lauriat = Php%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal price of your order=\tPhp%.2f",total);
printf("\n\n\tWould you like to make another order?\n\n\t\tPress(Y)
for YES.\n\t\tPress(N) for NO.\n\t\t");
d=getche();
choice:
switch(d)
{
case 'y': case 'Y':
{
goto menu;
}
case 'n': case 'N':
{
printf("\n\tPress (D) forDine in or Press (T) Take out: ");
scanf("%s",&dt);
printf("\n\n\t\t\t\tTHANK YOU:)\n\n\tThe original price is:\t\t
\tPhp%.2f\n\tVAT:\t\t\tPhp%.2f\n\n\tYour bill is:\t\t\t\tPhp
%.2f",op,total_vat,total);
money:
printf("\n\tYour Payment please:\tPhp");
scanf("%d",&payment);
if(payment<total)
{
printf("\n\tYou pay:\t\t\t\tPhp%d.00 'NOT ENOUGH
PAYMENT",payment);
goto money;
}
else if(payment>=total)
{
printf("\n\tYou pay:\t\t\t\tPhp%d.00",payment);
change=payment-total;
printf("\n\tYour change is:\t\t\t\tPhp%.2f",change);
printf("\n\n\tPlease press (ANY KEY) to get your receipt.
\n\n\t\t\t Thank You\n");
getche();
clrscr();
printf("\t\t\t\tChowking Food Corp.\n");
printf("\t\t\t\tNasugbu, Batangas\n");
printf("\t\t\t TIN# 000-333-173-015-VAT\n");
printf("\t\t\tJP. Laurel St. cor G. Alvarez St.\n");
printf("\n\t\tSN#BWN0310106\n");
printf("\t\tRCPT #211043\t\t\tRCPT_cnft\n");
printf("\t\tSTORE#0339\t\t\tSN#8y0026\n");
printf("\t\tSTAFF:%s\n\n",name);
if(dt=='d')
{
printf("\t\tDine in\n");}
else if (dt=='t')
{
printf("\t\tTake out\n");}
if(ssl>0){
printf("\n\t\t%d Sweet & Sour Lauriat @125 \t
%d",ssl, ssl*125);}
if(bfl>0){
printf("\n\t\t%d Breaded Fish Lauriat @125 \t
%d",bfl, bfl*125);}
if(s>0){
printf("\n\t\t%d Siomai @29 \t
%d",s, s*29);}
if(pc>0){
printf("\n\t\t%d Pancit canton @65 \t
%d",pc, pc*65);}
if(coker>0){
printf("\n\t\t%d Coke R @28 \t
%d",coker, coker*28);}
if(cokel>0){
printf("\n\t\t%d Coke L @39 \t
%d",cokel, cokel*39);}
if(itr>0){
printf("\n\t\t%d Iced Tea R @28 \t
%d",itr, itr*28);}
if(itl>0){
printf("\n\t\t%d Iced Tea L @39 \t
%d",itl, itl*39);}
if(minr>0){
printf("\n\t\t%d Mineral Water R @20 \t
%d",minr, minr*20);}
if(minl>0){
printf("\n\t\t%d Mineral Water L @27 \t
%d",minl, minl*27);}
printf("\n\t\tTOTAL COSTS\t\t\t %.2f\n\n",total);
printf("\t\tVAT\t\t\t\t %.2f\n\n",total_vat);
printf("\t\tCASH\t\t\t\t %d.00",payment);
printf("\t\t\t\t\t\tCHANGE\t\t\t\t %.2f",change);
}
break;
}
default:
{
clrscr();
printf("\t\tPress(Y) for YES.\n\t\tPress(N) for NO.\n\t
\t");
}}
break;
}
case 2:
{
printf("\n\tBreaded Fish Lauriat (Php125.00 each)\n\tHow many order
do you want?:\t");
scanf("%d",&b);
orig=125;
vat=(b*orig)*.10;
e=vat;
bfl=bfl+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tBreaded Fish Lauriat = Php%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal price of your order=\tPhp%.2f",total);
printf("\n\n\tWould you like to make another order?\n\n\t\tPress(Y)
for YES.\n\t\tPress(N) for NO.\n\t\t");
d=getche();
goto choice;
}
case 3:
{
printf("\n\tSiomao (Php29.00 each)\n\tHow many order do you want?:
\t");
scanf("%d",&b);
orig=29;
vat=(b*orig)*.10;
e=vat;
s=s+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tSiomao = Php%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal price of your order=\tPhp%.2f",total);
printf("\n\n\tWould you like to make another order?\n\n\t\tPress(Y)
for YES.\n\t\tPress(N) for NO.\n\t\t");
d=getche();
goto choice;
}
case 4:
{
printf("\n\tPancit Canton (Php65.00 each)\n\tHow many order do you
want?:\t");
scanf("%d",&b);
orig=65;
vat=(b*orig)*.10;
e=vat;
pc=pc+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tPancit Canton = Php%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal price of your order=\tPhp%.2f",total);
printf("\n\n\tWould you like to make another order?\n\n\t\tPress(Y)
for YES.\n\t\tPress(N) for NO.\n\t\t");
d=getche();
goto choice;
}
case 5:
{
drinks:
printf("\n\tHere is our Drinks:\n\t\tPress (1) for Coke:\n\t\tPress
(2) for Iced Tea:\n\t\tPress (3) for Mineral water:\n");
scanf("%d",&i);
switch(i)
{
case 1:
{
coke:
printf("\n\tYou choose COKE.\n\t\tPress (R) for
Regular.\n\t\tPress (L) for Large.\n>");
d=getche();
switch(d)
{
case 'r': case'R':
{
printf("\n\tRegular Coke worth Php28.00\n
\tHow many order do you want?\n");
scanf("%d",&b);
orig=28;
vat=(b*orig)*.10;
e=vat;
coker=coker+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tOrder for Reg. Coke costs =
Php%.2f.\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal =\tPhp
%.2f",total);
printf("\n\tWould you like to make another
order?\n\n\t\tPress (Y) for YES.\n\t\tPress (N) for NO.\n");
d=getche();
goto choice;
}
case 'l': case 'L':
{
printf("\n\tLarge Coke worth Php39.00\n
\tHow many order do you want?.\n");
scanf("%d",&b);
orig=39;
vat=(b*orig)*.10;
e=vat;
cokel=cokel+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tOrder for Large Coke costs =
Php%.2f.\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal =\tPhp
%.2f",total);
printf("\n\tWould you like to make another
order?\n\n\t\tPress (Y) for YES.\n\t\tPress (N) for NO\n");
d=getche();
goto choice;
}
default:
{
clrscr();
printf("\n\tPlease follow the instruction
below\n");
goto coke;
}
}
case 2:
{
iced_tea:
printf("\n\tYou choose ICED TEA.\n\t\tPress (R) for
Regular.\n\t\tPress (L) for Large.\n>");
d=getche();
switch(d)
{
case 'r': case 'R':
{
printf("\n\tRegular Iced Tea worth Php28.00\n
\tHow many order do you want?\n");
scanf("%d",&b);
orig=28;
vat=(b*orig)*.10;
e=vat;
itr=itr+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tOrder for Reg. Iced Tea costs =
Php%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal =\tPhp%.2f",total);
printf("\n\tWould you like to make another
order?\n\n\t\tPress ('Y' or 'y') for YES.\n\t\tPress ('N' or 'n') for NO
\n");
d=getche();
goto choice;
}
case 'l': case 'L':
{
printf("\n\tLarge Iced Tea worth Php39.00\n
\tHow many order do you want?\n");
scanf("%d",&b);
orig=39;
vat=(b*orig)*.10;
e=vat;
itl=itl+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tOrder for Large Iced tea costs =
Php%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal =\tPhp%.2f",total);
printf("\n\tWould you like to make another
order?\n\n\t\tPress ('Y' or 'y' for YES.\n\t\tPress ('N' or 'n) for NO\n");
d=getche();
goto choice;
}
default:
{
clrscr();
printf("\n\tPlease look at the instruction
below.\n");
goto iced_tea;
}
}
case 3:
{
mineral:
printf("\n\tYou choose MINERAL WATER.\n\t\tPress (R) for
Regular.\n\t\tPress (L) for Large.\n>");
d=getche();
switch(d)
{
case 'r': case 'R':
{
printf("\n\tRegular Mineral worth Php20.00\n
\tHow many order do you want?\n");
scanf("%d",&b);
orig=20;
vat=(b*orig)*.10;
e=vat;
minr=minr+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tOrder for Reg. Mineral costs = Php
%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal =\tPhp%.2f",total);
printf("\n\tWould you like to make another
order?\n\n\t\tPress ('Y' or 'y') for YES.\n\t\tPress ('N' or 'n') for NO
\n");
d=getche();
goto choice;
}
case 'l': case 'L':
{
printf("\n\tLarge Mineral worth Php27.00\n\tHow
many order do you want?\n");
scanf("%d",&b);
orig=27;
vat=(b*orig)*.10;
e=vat;
minl=minl+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tOrder for Large Mineral costs = Php
%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal =\tPhp%.2f",total);
printf("\n\tWould you like to make another
order?\n\n\t\tPress ('y' or 'Y') for YES.\n\t\tPress ('n' or 'N') for NO.
\n");
d=getche();
goto choice;
}
default:
{
clrscr();
printf("\n\tPlease look at the instruction
below.\n");
goto mineral;
}
}
}
}
}
default:
{
clrscr();
printf("\n\tPlease follow the instruction below.");
goto drinks;
}
}
}
}
getche();
}
I hope it will help to you!!
Screen shot:
Code:
//Made by : ALFRED C. DRIO
//Billing System For Chowking
//For more projects visit us: http://info-zone4you.blogspot.com/
#include<stdio.h>
#include<process.h>
#include<string.h>
#include<conio.h>
#include<dos.h>
void order();
void lo();
char hdr[]
="=========================================================================
=======\n\n\t\t\t\t Welcome to Chowking!\n\t\t\t\t Billing System\n\t\t
\t\t A.D. Software Inc.\n\n
\n=========================================================================
=======\n";
void lo()
{
clrscr();
int x=20;
gotoxy(19,19);printf("Loading...");
for(int a=0;a<=35;a++)
{
gotoxy(x,23);delay(100);printf("Ü");
x++;
}
order();
}
void main()
{
clrscr();
int choice;
printf("%s",hdr);
printf("1 - Make an order.\n");
printf("2 - Exit.\n\n");
printf("Enter your choice (1-2): ");
scanf("%d",&choice);
switch (choice)
{
case 1:lo();break;
case 2:exit(1);
}}
void order()
{
int choose;
int b;
int payment;
int i;
int ssl=0;
int bfl=0;
int s=0;
int pc=0;
int coker=0,cokel=0;
int itr=0,itl=0;
int minr=0,minl=0;
char name[25];
float c;
float e=0;
float f;
float orig;
float total=0;
float vat;
float total_vat=0;
float change;
float op=0;
float money;
char d;
char dt;
clrscr();
printf("%s",hdr);
printf("Enter your name: ");
scanf("%s",&name);
menu:
printf("\t\t\t\t Place your order.\n\n");
printf
("=========================================================================
=======\n");
printf("\tNo.\tMeal\t\t\t\tPrice\t\tAvailable:\n\n");
printf("\t(1) \tSweet & Sour pork Lauriat:\tPhp125.00\t\t\n");
printf("\t(2) \tBreaded Fish Lauriat: \tPhp125.00\t\t\n");
printf("\t(3) \tSiomai: \tPhp29.00\t\t\n");
printf("\t(4) \tPancit Canton: \tPhp65.00\t\t\n");
printf("\t(5) \tDrinks available:\n\t\t\t>Coke\n\t\t\t>Iced Tea\n\t\t
\t>Mineral Water\n");
printf
("=========================================================================
=======\n");
printf("Press your Order:\t");
scanf("%d",&choose);
printf
("=========================================================================
======\n");
switch(choose)
{
case 1:
{
printf("\n\tSweet & Sour pork Lauriat (Php125.00 each)\n\tHow many
order do you want?:\t");
scanf("%d",&b);
orig=125;
vat=(b*orig)*.10;
e=vat;
ssl=ssl+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tSweet & Sour pork Lauriat = Php%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal price of your order=\tPhp%.2f",total);
printf("\n\n\tWould you like to make another order?\n\n\t\tPress(Y)
for YES.\n\t\tPress(N) for NO.\n\t\t");
d=getche();
choice:
switch(d)
{
case 'y': case 'Y':
{
goto menu;
}
case 'n': case 'N':
{
printf("\n\tPress (D) forDine in or Press (T) Take out: ");
scanf("%s",&dt);
printf("\n\n\t\t\t\tTHANK YOU:)\n\n\tThe original price is:\t\t
\tPhp%.2f\n\tVAT:\t\t\tPhp%.2f\n\n\tYour bill is:\t\t\t\tPhp
%.2f",op,total_vat,total);
money:
printf("\n\tYour Payment please:\tPhp");
scanf("%d",&payment);
if(payment<total)
{
printf("\n\tYou pay:\t\t\t\tPhp%d.00 'NOT ENOUGH
PAYMENT",payment);
goto money;
}
else if(payment>=total)
{
printf("\n\tYou pay:\t\t\t\tPhp%d.00",payment);
change=payment-total;
printf("\n\tYour change is:\t\t\t\tPhp%.2f",change);
printf("\n\n\tPlease press (ANY KEY) to get your receipt.
\n\n\t\t\t Thank You\n");
getche();
clrscr();
printf("\t\t\t\tChowking Food Corp.\n");
printf("\t\t\t\tNasugbu, Batangas\n");
printf("\t\t\t TIN# 000-333-173-015-VAT\n");
printf("\t\t\tJP. Laurel St. cor G. Alvarez St.\n");
printf("\n\t\tSN#BWN0310106\n");
printf("\t\tRCPT #211043\t\t\tRCPT_cnft\n");
printf("\t\tSTORE#0339\t\t\tSN#8y0026\n");
printf("\t\tSTAFF:%s\n\n",name);
if(dt=='d')
{
printf("\t\tDine in\n");}
else if (dt=='t')
{
printf("\t\tTake out\n");}
if(ssl>0){
printf("\n\t\t%d Sweet & Sour Lauriat @125 \t
%d",ssl, ssl*125);}
if(bfl>0){
printf("\n\t\t%d Breaded Fish Lauriat @125 \t
%d",bfl, bfl*125);}
if(s>0){
printf("\n\t\t%d Siomai @29 \t
%d",s, s*29);}
if(pc>0){
printf("\n\t\t%d Pancit canton @65 \t
%d",pc, pc*65);}
if(coker>0){
printf("\n\t\t%d Coke R @28 \t
%d",coker, coker*28);}
if(cokel>0){
printf("\n\t\t%d Coke L @39 \t
%d",cokel, cokel*39);}
if(itr>0){
printf("\n\t\t%d Iced Tea R @28 \t
%d",itr, itr*28);}
if(itl>0){
printf("\n\t\t%d Iced Tea L @39 \t
%d",itl, itl*39);}
if(minr>0){
printf("\n\t\t%d Mineral Water R @20 \t
%d",minr, minr*20);}
if(minl>0){
printf("\n\t\t%d Mineral Water L @27 \t
%d",minl, minl*27);}
printf("\n\t\tTOTAL COSTS\t\t\t %.2f\n\n",total);
printf("\t\tVAT\t\t\t\t %.2f\n\n",total_vat);
printf("\t\tCASH\t\t\t\t %d.00",payment);
printf("\t\t\t\t\t\tCHANGE\t\t\t\t %.2f",change);
}
break;
}
default:
{
clrscr();
printf("\t\tPress(Y) for YES.\n\t\tPress(N) for NO.\n\t
\t");
}}
break;
}
case 2:
{
printf("\n\tBreaded Fish Lauriat (Php125.00 each)\n\tHow many order
do you want?:\t");
scanf("%d",&b);
orig=125;
vat=(b*orig)*.10;
e=vat;
bfl=bfl+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tBreaded Fish Lauriat = Php%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal price of your order=\tPhp%.2f",total);
printf("\n\n\tWould you like to make another order?\n\n\t\tPress(Y)
for YES.\n\t\tPress(N) for NO.\n\t\t");
d=getche();
goto choice;
}
case 3:
{
printf("\n\tSiomao (Php29.00 each)\n\tHow many order do you want?:
\t");
scanf("%d",&b);
orig=29;
vat=(b*orig)*.10;
e=vat;
s=s+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tSiomao = Php%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal price of your order=\tPhp%.2f",total);
printf("\n\n\tWould you like to make another order?\n\n\t\tPress(Y)
for YES.\n\t\tPress(N) for NO.\n\t\t");
d=getche();
goto choice;
}
case 4:
{
printf("\n\tPancit Canton (Php65.00 each)\n\tHow many order do you
want?:\t");
scanf("%d",&b);
orig=65;
vat=(b*orig)*.10;
e=vat;
pc=pc+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tPancit Canton = Php%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal price of your order=\tPhp%.2f",total);
printf("\n\n\tWould you like to make another order?\n\n\t\tPress(Y)
for YES.\n\t\tPress(N) for NO.\n\t\t");
d=getche();
goto choice;
}
case 5:
{
drinks:
printf("\n\tHere is our Drinks:\n\t\tPress (1) for Coke:\n\t\tPress
(2) for Iced Tea:\n\t\tPress (3) for Mineral water:\n");
scanf("%d",&i);
switch(i)
{
case 1:
{
coke:
printf("\n\tYou choose COKE.\n\t\tPress (R) for
Regular.\n\t\tPress (L) for Large.\n>");
d=getche();
switch(d)
{
case 'r': case'R':
{
printf("\n\tRegular Coke worth Php28.00\n
\tHow many order do you want?\n");
scanf("%d",&b);
orig=28;
vat=(b*orig)*.10;
e=vat;
coker=coker+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tOrder for Reg. Coke costs =
Php%.2f.\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal =\tPhp
%.2f",total);
printf("\n\tWould you like to make another
order?\n\n\t\tPress (Y) for YES.\n\t\tPress (N) for NO.\n");
d=getche();
goto choice;
}
case 'l': case 'L':
{
printf("\n\tLarge Coke worth Php39.00\n
\tHow many order do you want?.\n");
scanf("%d",&b);
orig=39;
vat=(b*orig)*.10;
e=vat;
cokel=cokel+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tOrder for Large Coke costs =
Php%.2f.\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal =\tPhp
%.2f",total);
printf("\n\tWould you like to make another
order?\n\n\t\tPress (Y) for YES.\n\t\tPress (N) for NO\n");
d=getche();
goto choice;
}
default:
{
clrscr();
printf("\n\tPlease follow the instruction
below\n");
goto coke;
}
}
case 2:
{
iced_tea:
printf("\n\tYou choose ICED TEA.\n\t\tPress (R) for
Regular.\n\t\tPress (L) for Large.\n>");
d=getche();
switch(d)
{
case 'r': case 'R':
{
printf("\n\tRegular Iced Tea worth Php28.00\n
\tHow many order do you want?\n");
scanf("%d",&b);
orig=28;
vat=(b*orig)*.10;
e=vat;
itr=itr+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tOrder for Reg. Iced Tea costs =
Php%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal =\tPhp%.2f",total);
printf("\n\tWould you like to make another
order?\n\n\t\tPress ('Y' or 'y') for YES.\n\t\tPress ('N' or 'n') for NO
\n");
d=getche();
goto choice;
}
case 'l': case 'L':
{
printf("\n\tLarge Iced Tea worth Php39.00\n
\tHow many order do you want?\n");
scanf("%d",&b);
orig=39;
vat=(b*orig)*.10;
e=vat;
itl=itl+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tOrder for Large Iced tea costs =
Php%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal =\tPhp%.2f",total);
printf("\n\tWould you like to make another
order?\n\n\t\tPress ('Y' or 'y' for YES.\n\t\tPress ('N' or 'n) for NO\n");
d=getche();
goto choice;
}
default:
{
clrscr();
printf("\n\tPlease look at the instruction
below.\n");
goto iced_tea;
}
}
case 3:
{
mineral:
printf("\n\tYou choose MINERAL WATER.\n\t\tPress (R) for
Regular.\n\t\tPress (L) for Large.\n>");
d=getche();
switch(d)
{
case 'r': case 'R':
{
printf("\n\tRegular Mineral worth Php20.00\n
\tHow many order do you want?\n");
scanf("%d",&b);
orig=20;
vat=(b*orig)*.10;
e=vat;
minr=minr+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tOrder for Reg. Mineral costs = Php
%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal =\tPhp%.2f",total);
printf("\n\tWould you like to make another
order?\n\n\t\tPress ('Y' or 'y') for YES.\n\t\tPress ('N' or 'n') for NO
\n");
d=getche();
goto choice;
}
case 'l': case 'L':
{
printf("\n\tLarge Mineral worth Php27.00\n\tHow
many order do you want?\n");
scanf("%d",&b);
orig=27;
vat=(b*orig)*.10;
e=vat;
minl=minl+b;
f=b*orig;
c=b*orig;
total+=c;
total_vat+=e;
op+=f;
printf("\n\tOrder for Large Mineral costs = Php
%.2f\n",c);
printf
("=========================================================================
====\n");
printf("\n\n\t\t\t\tTotal =\tPhp%.2f",total);
printf("\n\tWould you like to make another
order?\n\n\t\tPress ('y' or 'Y') for YES.\n\t\tPress ('n' or 'N') for NO.
\n");
d=getche();
goto choice;
}
default:
{
clrscr();
printf("\n\tPlease look at the instruction
below.\n");
goto mineral;
}
}
}
}
}
default:
{
clrscr();
printf("\n\tPlease follow the instruction below.");
goto drinks;
}
}
}
}
getche();
}
No comments:
Post a Comment