#include
int main()
{
int id[100],n,i=0,len;
char name[100][10];
int score[100][4];
while(1)
{
printf("分别输入学生%d的学号、姓名、三门成绩\n",i+1);
printf("(学号输入负数结束输入):");
scanf("%d",&n);
if(n<0)
break;
id[i]=n;
scanf("%s%d%d%d",name[i],&score[i][0],&score[i][1],&score[i][2]);
score[i][3]=score[i][0]+score[i][1]+score[i][2];
if(i++==99)
break;
}
printf("\n您输入的学生信息为:\n");
len=i;
for(i=0;iprintf("%d %s %d %d %d %d\n",id[i],name[i],score[i][0],score[i][1],score[i][2],score[i][3]);
}