-->
当前位置:首页 > 题库

PROGRAMMING:Calculate the total score and average score of C + + course of the whole class

Luz5年前 (2021-05-10)题库482
Define a class student to record students' scores of C + + courses. It is required to use static data members or static member functions to calculate the total score and average score of C + + course of the whole class.
###Input format:
Enter 5 positive integers no more than 100 as the C + + score.
###Output format:
Output the sum of the scores in the first line, and the average score in the second line.
###Input example:
```in
90 80 70 60 50
```
###Output example:
```out
three hundred and fifty
seventy
```







answer:If there is no answer, please comment
Define a class student to record students' scores of C + + courses. It is required to use static data members or static member functions to calculate the total score and average score of C + + course of the whole class.
###Input format:
Enter 5 positive integers no more than 100 as the C + + score.
###Output format:
Output the sum of the scores in the first line, and the average score in the second line.
###Input example:
```in
90 80 70 60 50
```
###Output example:
```out
three hundred and fifty
seventy
```