Menu

[solved] – Question 846

Suppose we have several lines in a file and we have 10 values in each line. For example,

1 5 5 5 5 5 5 3 5 5

3 4 4 4 2 4 4 4 4 4

5 2 2 2 2 2 4 4 4 4

6 5 5 5 5 5 5 3 5 5

8 4 4 4 2 4 4 4 4 4

9 2 2 2 2 2 4 4 4 4

. The first value in each line represents student ID, and the following 9 values represent 9 homework grades. As we will do in this class, we would like to find the sum of the best eight homework grades (in another words, subtract the lowest homework grade from the sum of nine homework grades). Then we would like to write student ID and the sum of the best eight homework grade into output-hw05.txt file

Expert Answer


OR


Leave a Reply

Your email address will not be published. Required fields are marked *