I have a text file with this:
65 78 65 89 25 98 -999
87 34 89 99 26 78 64 34 -999
23 99 98 97 26 78 100 63 87 23 -999
62 35 78 99 12 93 19 -999
the -999 at end of each line is my sentinel.
Output: sum of each line.
I can get it to read and output sum of 1st line but cant onto second line.
This is my 1st time posting a code qu up so if anyone helps me out, be gentle!
Here be my code
My output is:
Line 1: Total = 420
Line 2: Total = 420
Line 3: Total = 420
Line 4: Total = 420
The 420 value is the first lines total
The book im studying with has this as an example but doesnt give the proper code to properly try
test it.
p.s. i am a total novice!!!
thanks