Thursday, November 10, 2011

[discussion_vu] Idea solution of 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();
}
just take the idea...thnx


--

     

Phr Yaad-e-Khuda Se Ghafil Iss Duniya Ki Hawass Mein

Iss Mukhtasir Si Zindgi Ka Ik Aor Din Beet Gaya...!!!

                <<<<<<<<<< sAd pAncHi >>>>>>>>>>


--
You received this message because you are subscribed to the Google Groups "Virtual University of Pakistan" group.
To post to this group, send email to discussion_vu@googlegroups.com.
To unsubscribe from this group, send email to discussion_vu+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/discussion_vu?hl=en.

No comments:

Post a Comment

PAID CONTENT