I need to make a program in cplusplus.. Here's the instruction:
make a program that when the user input an Item name it will display or print the price of the inputed item, and when the user inputed the quantity of the item he inputed, it will display the total price.
Here's the output:
Item name:
Price:
Quantity:
Total Price:
here is the list of item of choice that will be inputed by the user:
first you cant have spaces in variable names so the fallowing is wrong
int washing machine=5200;
next
if (oven)
and all of your if statements for that matter will always evaluate to true since those variables all have non 0 values.
what you want to do in the if statement is check if a is the word "oven" or whatever.
So what i must do to make it run correctly.. Like if i inputed the item "cellphone"
it will display the price of that item not all the price of all the items? XD
i think if i make it correctly, i can apply it to the "quantity and total cost" part.