程序怎么修改
#include"stdio.h"main()
{
struct st
{
int snum;
int age;
char sex;
float score;
};
struct st info;
printf("Input number:");
scanf("%d",&info.snum);
printf("Input age:");
scanf("%d",&info.age);
printf("Input sex:");
scanf("%c\n",&info.sex);
printf("Input score:");
scanf("%f",&info.score);
printf("%d ", info.snum);
printf("%d ", info.age);
printf("%c", info.sex);
printf("%f ", info.score);
}
这个程序里面给预期的结果不一样,应该怎么改?