#include // 定义人员结构体typedef struct { char name[20]; int id; int age; double cp_score; int cp_count; double cp_grade;} Student;// 计算综合成绩void calculateGrade(Student *s) { s->cp_grade = s->cp_score * 0.9 + s->cp_count * 0.1;}// 输出学生信息void printStudent(Student s) { printf("%d %s %.1f\n", s.id, s.name, s.cp_grade);}int main() { Student students[100]; int n = 0; while (1) { scanf("%s", students[n].name); if (students[n].name[0] == '0') break; scanf("%d %d %lf %d", &students[n].id, &students[n].age, &students[n].cp_score, &students[n].cp_count); calculateGrade(&students[n]); n++; } for (int i = 0; i printStudent(students[i]); } return 0;}