C-学生成绩输入和输出

Description

编写一个函数print,打印一个学生的成绩数组,该数组中有5个学生的数据,每个学生的数据包括num(学号)、name(姓名)、score3。编写一个函数input,用来输入5个学生的数据。

Input

5个学生的学号,姓名,3门课的成绩

Output

5个学生的学号,姓名,3门课的成绩

Sample Input

1001 zhangsan 100 90 86
1002 lisi 90 20 80
1003 wangwu 90 90 89
1004 yanping 100 100 100
1005 xiaoxiao 60 60 60

Sample Output

1001 zhangsan 100 90 86
1002 lisi 90 20 80
1003 wangwu 90 90 89
1004 yanping 100 100 100
1005 xiaoxiao 60 60 60

#include 
#include 
struct student
{
    int num;
    char name[20];
    int score1;
    int score2;
    int score3;
};
void input(struct student stu[5],int n)
{
    int i;
for(i=0;i

你可能感兴趣的:(C-学生成绩输入和输出)