结构体初级啊啊啊啊啊啊

题目描述

现有有N个学生的数据记录,每个记录包括学号、姓名、三科成绩。编写一个函数input,用来输入一个学生的数据记录。编写一个函数print,打印一个学生的数据记录。在主函数调用这两个函数,读取N条记录输入,再按要求输出。 N<100

输入格式:

学生数量N占一行每个学生的学号、姓名、三科成绩占一行,空格分开。

输出格式:

每个学生的学号、姓名、三科成绩占一行,逗号分开。

输入样例

2
a100 zhblue 70 80 90

b200 newsclan 90 85 75

输出样例

a100,zhblue,70,80,90

b200,newsclan,90,85,75

我的代码如下

#include <stdio.h>
struct input
{
    int yw,sx,yy;
    char xh,xm;
};
int main()
{
    int n,i;
    struct input std;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%s %s",std.xh,std.xm);
        scanf("%d %d %d",&std.yw,&std.sx,&std.yy);
        printf("%s,%s,%d,%d,%d\n",std.xh,std.xm,std.yw,std.sx,std.yy);
    }
    return 0;
}

麻烦大佬调试一下,指出问题

输入按格式要求写,字符和数字混合的。
例如scanf("%s %d %d %d",这里是字符变量,&std.yw,&std.sx,&std.yy);