- UID
- 19709
- 铜币
- 9941 个
- 威望
- 6 点
- 贡献值
- 0 点
- 金币
- 0 个
- 积分
- 889
|
RT,电脑课的作业,说是一个project。
最近上课不是玩手机就是睡觉,还有用电脑玩4399.
完全没听课,求支援,告诉我一下应该用到include什么,还有用什么statement就可以了
TB奖励
Write a complete C++ program, including comments, to do the following:
You are to write a program which will assign and print a student's final grade in a course. The final grade will be based on grades received on two regular exams and the grade received on the final exam.
You are to proceed as follows:
a) Prompt the user to enter a given student's data from the keyboard. The data, to be entered on one line, consists of the student's ID, and the student's grades on the first, second, and final exams. The program should print the original information read.
A typical set of data could be 1234 95 82 91.
b) Each grade entered is to be checked. If the grade entered was negative, replace it by its positive equivalent (e.g., -75 becomes +75). If the grade was greater than 100, subtract 100 from the grade as many times as needed to bring the grade into the range 0...100.
c) The student's final numeric grade is to be calculated from the corrected grades. The final numeric grade will be computed on the following basis: each regular exam counts 35% and the final exam counts 30%. The program will call this value final_grade.
d) The program will them print the student's ID, the corrected grades on each exam, the final numeric grade, and an alphabetic grade based on the student's final numeric grade as follows:
final grade - > alphabetic grade
90...100 - > A
80...89 - > B
70...79 - > C
60...69 - > D
0...59 - > F
e) Repeat the entire series of operations for each successive student until all students have been processed. Make it work for a variable number of students.
|
|