This is my assignment and I'm a bit stuck. Just need someone to point me in the right direction please. In this assignment, we're supposed to read data from notepad consisting of Part Name, Number of Units, Price and Total Value using a while loop. Then, we calculate the total value of parts by multiplying number of units by the price. I've done this correctly, but the second parts asks for the Inventory total, which is the addition of all the total values in the loop.
here is my code(sorry I don't know how to post it in the correct format yet):
the calculation I made (iTotal = tValue + tValue), which is obviously incorrect, only adds the last value to itself. I omitted some lines, and can someone please tell me how to post codes in the proper format. Thank you