Okay I got it to work. BUt now I have a problem with what is in the output file. Basically it is supposed to reflect what is in the input file(last name, first name, 10 scores(all separated by one space). Each student is on a separate line.
The output file should show the same information but also have the average at the end of each line for each student.
This is what output file currently looks like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
SmithKylie1919
2019
1819
2019
1919
1719
2019
1819
1919
2019
18202036.1
036.1
1836.1
2036.1
1936.1
1736.1
2036.1
1836.1
1936.1
2036.1
|
here is my input file (for reference):
Smith Kylie 19 20 18 20 19 17 20 18 19 20
Johnson Aaron 20 18 20 20 20 19 17 18 20 20
Williams Craig 20 18 19 19 19 18 20 20 20 19
Jones Logan 17 19 18 19 17 18 20 19 20 17
Howard Chole 20 19 18 18 19 19 19 20 20 17
Miller Olivia 18 19 18 18 20 19 20 19 19 19
Davis Lincoln 20 20 19 19 20 20 20 19 19 20
Jackson Robert 19 18 18 19 19 19 17 19 20 18
Martin Sophia 20 20 19 19 19 18 18 18 19 20
Clark Rory 20 20 20 20 19 19 20 19 19 20
Harris Daniel 19 18 18 18 19 20 20 20 20 19
Hall Ella 20 20 19 19 18 19 19 20 20 19
Young Zoe 19 19 19 18 20 19 20 18 19 20
Scott Luke 20 20 20 19 19 19 20 18 18 20
Thompson Alex 19 19 18 18 20 18 20 20 19 19