How do i store prices for food on a menu?
Go to solution
Solved by Nineshadow,
So i need to create another variable for the price of each food?
You already have them :
double GoodBurgers = 7.75;
double GoodSalads = 7.00;
double Sodas = 2.00;
double KidsMeals = 3.00;
Just change
subtotal = subtotal + GoodBurger/GoodSalad/etc. ( not the doubles I've just listed)
to :
subtotal = subtotal + GoodBurgers/GoodSalads/etc. ( the variables in which you store the price for each food)
Then print it at the end.(choice == 5)
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now