#include //定义结构体 struct Student { int ID;//学号 float math_grade; float physics_grade; float English_grade; float sum; }; int main() { struct Student information[3]; for(int i=0;i<3;i++) { scanf("%d%f%f%f",&information[i].ID,&information[i].math_grade,\ &information[i].physics_grade,&information[i].English_grade); information[i].sum=information[i].math_grade+\ information[i].physics_grade+information[i].English_grade; } for(int i=0;i<3;i++) { printf("%d %.1f %.1f %.1f %.1f\n",information[i].ID,\ information[i].math_grade,information[i].physics_grade,\ information[i].English_grade,information[i].sum); } }