9.编写程序:有3个学生,每个学生有4门课程的成绩。要求用户输入学生 序号以后,能输出该学生的全部成绩。用指针函数来实现 学...

可以这样实现: #include <stdio.h>struct student{ int num; // 学生序号 int score[4]; // 成绩 };void input(struct student *p, int n); //输入成绩 void output(struct student *p); //输出成绩int main(){ struct student stu[3]; //定义3个学生 input(stu,3); //输入成绩 int num; while(1){ printf("请输入学生序号:");

猜你喜欢

转载自blog.csdn.net/weixin_35751412/article/details/129510999