#import <Foundation/Foundation.h>
typedef struct Student
{
int num;
char name[20];
double score[3];
}student;
int main(int argc,constchar * argv[])
{
@autoreleasepool {
// insert code here...
NSLog(@"Hello, World!");
student stu1,stu2,stu3,stu4,stu5;
student stu[5] = {stu1,stu2,stu3,stu4,stu5};
printf("请输入5个学生的信息:\n");
for (int i =0; i<2; i++)
{
scanf("%d",&stu[i].num);
scanf("%s",stu[i].name);
scanf("%lf%lf%lf",&stu[i].score[0],&stu[i].score[1],&stu[i].score[2]);
}
for (int i =0; i<2; i++)
{
printf ("%d\n",stu[i].num);
printf ("%s\n",stu[i].name);
printf ("%lf\n%lf\n%lf\n",stu[i].score[0],stu[i].score[1],stu[i].score[2]);
}
}
return0;
}