import <Foundation/Foundation.h>
struct Student{
char name[20];
int age;
char sex[5];
int num;
int score;
};
void quru(struct Student *a)
{
printf("请输入姓名:");
scanf("%s",a->name);
printf("刚刚输入的姓名是:%s\n",a->name);
printf("请输入性别:");
scanf("%d",a->age);
printf("刚刚输入的姓名是:%d\n",a->age);
printf("请输入性别:");
scanf("%s",a->sex);
printf("刚刚输入的姓名是:%s\n",a->sex);
}
int main(int argc, const char * argv[])
{
struct Student abc;
quru(&abc);
return 0;
}
年龄那怎么修改?谢谢各位,我是菜鸟 |