Thursday, 3 November 2011

Re: ::: vuaskari.com ::: CS201

//mc110201162
//Aziz Ahmed Aasi
//Program for virtual Billing System

#include<iostream.h>
#include<conio.h>

main()
{

int MealPrice, NoOfCustomer=1;
float SaleTax,TotalAmount,GrandTotal=0;
char Aziz;

cout<<"*** Virtual Restaurant *** ";
StartAgain:
cout<<"\n Enter the Price of the meal: ";
cin>>MealPrice;

if(MealPrice>0 && MealPrice<=1000)
{
cout<<"\n Price of Meal: "<<MealPrice;
SaleTax=MealPrice*0;
cout<<"\n Sales Tax : "<<SaleTax;
cout<<"\n-----------------------------------";
TotalAmount=MealPrice+SaleTax;
cout<<"\n Total Amount : "<<TotalAmount;
cout<<"\n This customer should be served with Candies ";
}

else if(MealPrice>1000 && MealPrice<=2000)
{
cout<<"\n Price of Meal: "<<MealPrice;
SaleTax=MealPrice*(.01);
cout<<"\n Sales Tax :"<<SaleTax;
cout<<"\n-----------------------------------";
TotalAmount=MealPrice+SaleTax;
cout<<"\n Total Amount : "<<TotalAmount;
cout<<"\n This customer should be served with Sweet Bread ";
}

else if(MealPrice>2000 && MealPrice<=3000)
{
cout<<"\n Price of Meal: "<<MealPrice;
SaleTax=MealPrice*(.02);
cout<<"\n Sales Tax :"<<SaleTax;
cout<<"\n-----------------------------------";
TotalAmount=MealPrice+SaleTax;
cout<<"\n Total Amount : "<<TotalAmount;
cout<<"\n This customer should be served with Pudding ";
}

else if(MealPrice>3000 && MealPrice<=4000)
{
cout<<"\n Price of Meal: "<<MealPrice;
SaleTax=MealPrice*(.02);
cout<<"\n Sales Tax :"<<SaleTax;
cout<<"\n-----------------------------------";
TotalAmount=MealPrice+SaleTax;
cout<<"\n Total Amount : "<<TotalAmount;
cout<<"\n This customer should be served with Cake ";
}

else if(MealPrice>4000)
{
cout<<"\n Price of Meal: "<<MealPrice;
SaleTax=MealPrice*(.02);
cout<<"\n Sales Tax :"<<SaleTax;
cout<<"\n-----------------------------------";
TotalAmount=MealPrice+SaleTax;
cout<<"\n Total Amount : "<<TotalAmount;
cout<<"\n This customer should be served with Trifle ";
}

GrandTotal =GrandTotal+TotalAmount;

cout<<"\n\n Do You Want to process another customer: ?";
cout<<"\n\n Enter'Y' for Yes or 'N' for exit>:";
cin>>Aziz;

switch (Aziz)
{
case'Y':
case'y':
NoOfCustomer++;

goto StartAgain;
break;

case'N':
case'n':
cout<<"\n\nGrand Totals: ";
cout<<"\nTotal Customers: "<<NoOfCustomer;
cout<<"\nTotal Amount for all Bills: "<<GrandTotal;
break;
}



getch();
}
mc110201162@vu.edu.pk
At Aims Campus Lahore
 

--
We say, "Be one as Pakistani Nation and grow up for Pakistan's Future". Wish you all the best. Join www.vuaskari.com,
To post to this group, send email to vuaskari_com@googlegroups.com
Visit these groups:
This (Main) Group:http://groups.google.com/group/vuaskari_com?hl=en?hl=en
MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
Management: https://groups.google.com/group/vuaskari_mgt?hl=en
Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
MIS Group: http://groups.google.com/group/askari_mis?hl=en

No comments:

Post a Comment