Hi i am making a program that can calculate the total of two items including tax. I am stuck on the actual calculations of the program, the values it displays for item1total and item2total is wrong, but the calculations for it seems ok?. Can i get some insight of what i did wrong?
Here is a sample, the prices display 0, which i think is something wrong with my formulas, but they seem okay to me.
Enter the name of item 1:Apple
Enter number of Apple and the price of each:2 2.1
Enter the name of item 2:Grapes
Enter number of Grapes and the price of each:3 3.1
Item Count Price
==== ==== ====
Apple 2.00 0.00
Grapes 3.00 0.00
Tax 0.00
Total 0.00
Thank you Ispil, i figured it out after you said that the code was going sequentially. I moved the calculations after the "cin" input and it works great! Would you believe that i spent 30 minutes trying to get it work? Lifesaver thanks again, lesson learned. :)