using namespace std;
void menu()
{
cout < "******welcome="" to="" the="" farhan's="" restaurant******"=""><>
cout<><>
cout<"no. ="" ="" ="" ="" menu="" ="" ="" ="" ="" ="" ="">"no.><>
cout<"1. cheese="" burger="" ="" ="" ="" ="" ="" ="" rm="">"1.><>
cout<"2. chicken="" wings(6="" pieces)="" ="" rm="">"2.><>
cout<"3. 12\"="" pepperoni="" pizza="" ="" ="" ="" rm="">"3.><>
cout<"4. fries="" ="" ="" ="" ="" ="" ="" ="" ="" ="" ="" rm="">"4.><>
cout<"5. onion="" rings="" ="" ="" ="" ="" ="" ="" ="" rm="">"5.><>
cout<"6. pepsi="" ="" ="" ="" ="" ="" ="" ="" ="" ="" ="" rm="">"6.><>
cout<"7. mineral="" water="" ="" ="" ="" ="" ="" ="" rm="">"7.><>
}
main()
{
string phone; //we use string so that the 0 value can be displayed
string Name;
while (1)
{
cout < "please="" enter="" the="" customer's="">
getline(cin,Name); //to ensure we can input two names at once
bool invalid = false;
for (int i = 0; i < name.length();="">
{
int charASCII = Name[i];
if ((charASCII >= 65 && charASCII <= 90)="" ||="" (charascii="">= 97 && charASCII <= 122)="" ||="" charascii="=">=>
{
//do nothing
}
else
{
invalid = true;
}
}
if (!invalid)
break;
cout < "invalid="" name="" try="">
}
cout<"please enter="" your="" phone="" number="">"please>
cin>>phone;
float jum;
string promo;
int n;
int qty[7];
int no[7];
long price[7],tot[4];
string name[7];
float change,pay,discount;
menu();
cout<><>
cout<"how many="" types="" of="" menu="" do="" you="" want:="">"how>
cin>>n;
if(n>0 && n<=7) loop="" for="">=7)>
{
for(int i=0; i<>
{
cout<"enter your="" choice="">"enter>< ="" ="" ="" cin="">>no[i];
cout<"enter quantity=";
cin>>qty[i];
if(no[i]==1)
{
name[i]=" cheese="">"enter>
price[i]=8;
tot[i]=price[i]*qty[i];
}
else if(no[i]==2)
{
name[i]="Chicken Wings(6 pieces)";
price[i]=10;
tot[i]=price[i]*qty[i];
}
else if(no[i]==3)
{
name[i]="12\" Pepperoni Pizza ";
price[i]=20;
tot[i]=price[i]*qty[i];
}
else if(no[i]==4)
{
name[i]="Fries";
price[i]=5;
tot[i]=price[i]*qty[i];
}
else if(no[i]==5)
{
name[i]="Onion Rings";
price[i]=6;
tot[i]=price[i]*qty[i];
}
else if(no[i]==6)
{
name[i]="Pepsi";
price[i]=2;
tot[i]=price[i]*qty[i];
}
else if(no[i]==7)
{
name[i]="Mineral Water";
price[i]=3;
tot[i]=price[i]*qty[i];
}
jum=jum+tot[i];
}
system("cls");
menu();
cout<><>
cout<"your choice="" is="">"your><>
for(int i=0;i
{
cout<><><" portion="">"><><><>
cout<"price portion="< cout<<" total="" price="">"price><><><><>
}
cout<"we only="" accept="" cash="">"we>
cout<"paid :="" rm="">"paid>
cin>>pay;
cout<"do you="" have="" a="" promo="">"do><>
cin>>promo;
change=pay-jum;
cout<><>
cout<"your name="">"your><><>
cout<"phone no="">"phone><><>
cout<"change:>"change:><><>
cout<"thank you="" for="">"thank>
}
else
cout<"code your="" input="" doesnt="">"code>
return 0;
}
Extracted text: Total Amount of A Bill Bill ends in sen Round off to the nearest 5 sen Total amount before rounding (RM) Total amount after rounding (RM) 82.01 1,2 Down 82.00 82.02 82.03 3,4 Up 82.05 82.04 82.06 6,7 Down 82.05 82.07 82.08 8,9 Up 82.10 82.09 >=>