Heres an algorithm that reads all the numbers from a file, displays them and then closes the file:
Declare InputFile numberList
Declare Integer i
Open numberList "number_list.dat"
Display "Here are the numbers:"
While NOT eof (numberList)
Read NumberList i
Display i
End While
Close myName
Heres my question...From this algorithm that i wrote, i have to modify it so that it adds all of the numbers read from the file and displays their total
I have done it a few times but what i did just seems too simple. some help would be great
Thanks