#include <stdio.h>

typedef struct student{
    int num;
    char name[20];
    float socre[3];
}student;
//student 作为一个类型
//如果不写typedef则结构体类型为 struct student

void output(student stuList[5]){
    int i;

    for(i=0;i<5;i++){
        printf("%d\t%s\t%f\t%f\t%f\n", stuList[i].num, stuList[i].name, stuList[i].socre[0], 
                                stuList[i].socre[1], stuList[i].socre[2]);
    }
}

void input(student stuList[5]){
    int i;
    for(i=0;i<5;i++){
        scanf("%d %s %f %f %f", &stuList[i].num, stuList[i].name, &stuList[i].socre[0], 
                                &stuList[i].socre[1], &stuList[i].socre[2]);
    }
}
int main(){
    student stuList[5];//定义了一个结构体数组里面可以容纳5个结构体变量

    input(stuList);
    output(stuList);
    return 0;
}