.txt file:
Johnson 60 12.50
Aniston 65 13.25
Cooper 50 14.50
Gupta 70 14.75
Blair 55 10.50
Clark 40 18.75
Kennedy 45 20.50
Bronson 60 20.00
Sunny 65 18.75
Smith 30 9.75
So basically what i'm trying to do here is take the second column of numbers and only that, so for instance looking at line 1 of the .txt file I'm attempting to only extract '60' which is the number of hours worked. On my code i get the correct value for 'hr1' however when I continue this method onto hr2 it doesn't work and it prints 12. So my question is what do I need to do in order to jump to the next line so hr2 is '65'
I think instead of int, float/double should be used for hr2 since hr2 since the value that will be stored in hr2 is a decimal (int is only for integers).