#include <iostream.h>
#include <conio.h>
#include <iomanip.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
int main(){
clrscr();
const int cb=20,fl=20,yb=20,drinks=20,coke=20,
sprite=20,royal=20,pj=25,med=5,large=10;
int total,cash,change,quantity;
int order = 1;
const char *items[]={"Cheese Buger","Foot Long","Yum Burger","Drinks","Coke"
,"Sprite","Royal","Pineapple Juice"};
char loop;
int rows;
int itemElements = sizeof(items)/sizeof(items[0]);
cout << "\t"<<setw(10) << "Item" << "\t" << " Price" <<"\t"<< "\n";
cout << "\t" << "Cheese Burger" << "\t" << setw(5)<<cb << "\n";
cout << "\t" << "Foot Long" << "\t" <<setw(5)<< fl << "\n";
cout << "\t" << "Yum Burger" << "\t" <<setw(5)<< yb << "\n";
cout << "\t" << "Water" << "\t" <<setw(14)<< drinks << "\n";
cout << "\t" << "Coke" << "\t" <<setw(14) <<coke << "\n";
cout << "\t" << "Sprite" << "\t" <<setw(14) <<sprite << "\n";
cout << "\t" << "Royal" << "\t" <<setw(14) <<royal << "\n";
cout << "\t" << "P.J" << "\t"<<setw(14)<< pj << "\n";
cout << "\t" << "Med" << "\t" <<setw(14)<< med << "\n";
cout << "\t" << "Large" << "\t" <<setw(14) <<large << "\n";
cout << "Hi, Sir/Maam welcome to boboys! What would you like?" << "\n" ;
struct food{
char itemName;
int price;
};
food f;
do{
cin >> order;
switch(order)
{
case 0:
break;
case 1:
cout << "How many Chesse Burgers do you Like?\n";
cin >> quantity;
total=cb * quantity;
break;
case 2:
cout << "How many Foot longs do you like?\n";
cin >> quantity;
total = fl * quantity;
break;
case 3:
cout << "How many Yum Burgers do you like?\n";
cin >> quantity;
total = yb * quantity;
break;
case 4:
cout << "How many Waters do you like?\n";
cin >> quantity;
total = drinks * quantity;
break;
case 5:
cout << "How many Cokes do you like?\n";
cin >> quantity;
total = coke * quantity;
break;
case 6:
cout << "How many Royals do you like?\n";
cin >> quantity;
total = royal * quantity;
break;
case 7:
cout << "How many Sprites do you like?\n";
cin >> quantity;
total = sprite * quantity;
break;
case 8:
cout << "How many Pine Apple Juices do you like?\n";
cin >> quantity;
total = pj * quantity;
break;
default: cout << "Please select a Valid Order!";
}
cout << "Cash on Hand: ";
cin >> cash;
change = total - cash;
cout << "You Have Ordered \n";
cout << "======================================================\n";
cout << setw(15) << "ITEM" <<setw(15)<< "QUANTITY"<<setw(15)<< "PRICE\n";
cout << "=====================================================\n";
cout <<items[order-1]<<setw(15)<<quantity<<setw(15)<<total;
cout << "\n";
cout << "Would you like to Order Again? Y/N " ;
cin >> loop;
} while(loop == 'Y'|| loop == 'y');
cout << "Thank You, Your total Bill is: " << total;
getche();
return 0;
}