10-31-2011, 11:28 PM
//gm mughal (03336283082)
#include<iostream.h>
#include<conio.h>
main()
{
int price,count=1;
float tax,t_amnt;
char choice;
double g_total;
cout<<"***VIRTUAL RESTURENT***"<<endl<<endl;
start:
cout<<"\nEnter the price of meal : ";
cin>>price;
if(price>=2000)
tax=price*0.02;
else if (price>=1000)
tax=price*0.01;
else
tax=0.0000;
t_amnt=price+tax;
g_total+=t_amnt;
cout<<"Price of the Meal :"<<price<<endl;
cout<<"Sales Tax :\t "<<tax<<endl;
cout<<"-------------------------"<<endl;
cout<<"Total Amount : \t "<<t_amnt<<endl;
if(price>=4000)
cout<<"\nThis Customer shouled be served with Trifle"<<endl;
else if(price>=3000)
cout<<"\nThis Customer shouled be served with Cake"<<endl;
else if(price>=2000)
cout<<"\nThis Customer shouled be served with Pudding"<<endl;
else if(price>=1000)
cout<<"\nThis Customer shouled be served with Sweet Bread"<<endl;
else
cout<<"\nThis Customer shouled be served with Sweet Candies"<<endl;
cout<<"\nDo you want to Processe anonter Customer ?"<<endl;
cout<<"\nEnter 'Y' for Yes or 'N' for Exit >:";
cin>>choice;
if(choice=='Y'||choice=='y')
{
++count;
goto start;
}
else if(choice=='N' || choice=='n')
cout<<"\n\nGrand Total:"<<endl;
cout<<"\nTotal Customers : "<<count<<endl;
cout<<"Total Amout for all Customers :"<<g_total<<endl;
getch();
}
#include<iostream.h>
#include<conio.h>
main()
{
int price,count=1;
float tax,t_amnt;
char choice;
double g_total;
cout<<"***VIRTUAL RESTURENT***"<<endl<<endl;
start:
cout<<"\nEnter the price of meal : ";
cin>>price;
if(price>=2000)
tax=price*0.02;
else if (price>=1000)
tax=price*0.01;
else
tax=0.0000;
t_amnt=price+tax;
g_total+=t_amnt;
cout<<"Price of the Meal :"<<price<<endl;
cout<<"Sales Tax :\t "<<tax<<endl;
cout<<"-------------------------"<<endl;
cout<<"Total Amount : \t "<<t_amnt<<endl;
if(price>=4000)
cout<<"\nThis Customer shouled be served with Trifle"<<endl;
else if(price>=3000)
cout<<"\nThis Customer shouled be served with Cake"<<endl;
else if(price>=2000)
cout<<"\nThis Customer shouled be served with Pudding"<<endl;
else if(price>=1000)
cout<<"\nThis Customer shouled be served with Sweet Bread"<<endl;
else
cout<<"\nThis Customer shouled be served with Sweet Candies"<<endl;
cout<<"\nDo you want to Processe anonter Customer ?"<<endl;
cout<<"\nEnter 'Y' for Yes or 'N' for Exit >:";
cin>>choice;
if(choice=='Y'||choice=='y')
{
++count;
goto start;
}
else if(choice=='N' || choice=='n')
cout<<"\n\nGrand Total:"<<endl;
cout<<"\nTotal Customers : "<<count<<endl;
cout<<"Total Amout for all Customers :"<<g_total<<endl;
getch();
}
