#define N 5
struct student
{
int num;
char name[20];
float score[3];
}str[N];
void print(struct student str[])
{
struct student* ret = str;
int i = 0;
for(i = 0;i<N;i++)
{
printf("%d %s %.2f\n", ret->num, ret->name, ret->score[0], ret->score[1], ret->score[2]);
ret++;
}
}
int main()
{
printf("请输入五个学生的信息\n");
int i = 0;
for (i = 0; i < N; i++)
{
scanf("%d %s %f", &str[i].num, str[i].name, &str[i].score[0], &str[i].score[1], &str[i].score[2]);
}
print(str);
}
04-02
1567
06-14
1395
05-05
3629
12-30
439