So the idea of this program is to display menu options, total those options, and display the selections made with the total.....
I've been stuck on this for too long now and could not find the answers in other posts... Any help would be great....As you can see i got to my array and then had issues as to how to input those selections if they were chosen as characters... not to mention displaying and totaling those selections without getting scientific notation
CODE
using namespace std;
#include<iostream>
int main()
{
int menuitems[4];
double A;
double B;
double C;
double D;
double E;
int x;
A=2.99;
B=3.99;
C=1.99;
D=1.49;
E=2.49;
double total;
cout<<"Welcome to GoodBurger, May I take your order?"<<endl;
system("pause");
cout<<"A-Hamburger.......$2.99"<<endl;
cout<<"B-Cheese Burger...$3.99"<<endl;
cout<<"C-French Fries....$1.99"<<endl;
cout<<"D-Soft Drink......$1.49"<<endl;
cout<<"E-Milk Shake......$2.49"<<endl;
cout<<" "<<endl;
cout<<"Enter the corresponding letter of the menu item you would like..."<<endl;
cout<<"When you are ready for your total, Type Done..."<<endl;
for(x=0;x<4;x++)
{
cout<<"Enter your selection one item at a time and press enter"<<endl;
cin>>menuitems[x];
if(menuitems[0]==A)
{
menuitems[0]=2.99;
}
}
total=menuitems[0]+menuitems[1]+menuitems[2]+menuitems[3]+menuitems[4];
cout<<"You're Total Is:"<<total<<endl;
system("pause");
}