C#C
C#3y ago
eazy35

❔ need help with homework (while loop)

hey guys, I am a novice programmer
I currently go to school for an MSIS degree
I am learning c#

I have a homework project that wants me to create a loop for a vending machine and i got everything to work (according to what the homework asked of me), but when it comes to calculate the total cost it only calculates the cost of the last thing i ordered.

can anyone help me with this problem? thank you in advanced.

the power point pics explain the home work.

I also posted my code. my code works for the loop but it just does not add the total money of all my orders only the last order.
image.png
image.png
code_a.txt1.98KB
Was this page helpful?