Price Units Amount
9.00 1.00 9.00
8.00 2.00 16.00
7.00 3.00 21.00
6.00 4.00 24.00
5.00 5.00 25.00
Total: 2.00
Press any key to continue . . .
I dont know what the problem is :s but if anyone can help me out that would be great, I am already late with this assignment but I am able to turn it in by Thursday to get credit.
Limit the scope of your variables for(int i=0; i<5; ++I)
then line 18 would not compile (if you do a desk test you'll realise that you are trying to access the array out of bounds)
I think that the total array should be calculated and no hardcoded. However, I don't see the meaning of total[0]'