* #include<iostream> order a meal!#include<string>#include<iomanip>usingnamespace std;typedefstruct dish
{char name[20];float price;}meal;voidPayTheBill(float total,float discount=1);intmain(void){
meal table[5]={{"fish",50.5},{"bread",10.5},{"milk",5.0},{"cake",40.5},{"chocolate",15}};for(int i=0;i<5;i++){
cout<<table[i].name<<" "<<table[i].price<<endl;}int flag,ending,amount;float total=0.0;
cout<<"please choose what you want from the top"<<endl;for(int i=0;i<5;i++){
cout<<"do you want "<<table[i].name<<"? yes/1 no/0 and amount?"<<endl;
cin>>flag;if(flag)
cout<<"how many?"<<" ";
cin>>amount;
total=total+(table[i].price)*amount;if(i<=4){
cout<<"do you want more? yes/1 no/0"<<endl;
cin>>ending;if(!ending)break;}else
cout<<"that's all,have a good time"<<endl;}
cout<<"if a vip? yes/1 no/0"<<endl;
cin>>flag;if(flag){PayTheBill(total,0.8);}else{PayTheBill(total);}return0;}voidPayTheBill(float total,float discount)//even though don't have a return ,void cant be delete function define not allowed to give defalut{float n;
n=total*discount;
cout<<"sum up to "<<n<<endl;
cout<<"have a good time!";}