int Input(Person per[],int n) {
int i=0;
char sign[50];
do {
printf("\t编号:");
scanf("\t%s",per[n+i].score);
fflush(stdin);
printf("\t姓名:");
scanf("\t%s",per[n+i].name);
printf("\t年龄:");
scanf("\t%s",per[n+i].age);
printf("\t性别:");
scanf("\t%s",per[n+i].sex);
printf("\t通讯住址:");
scanf("\t%s",per[n+i].adds);
printf("\t出生日期:");
scanf("\t%s",per[n+i].birthday);
fflush(stdin);
printf("\n\t是否继续添加");printf("\n\t1:是\t2:否\t ");
do{
scanf("\t%s",sign);
fflush(stdin);
if((sign[0]=='1'||sign[0]=='2')&&(sign[1]==NULL))
{
break;
}
else
printf("\t输入错误,重新输入!\t");
}while (1);
i++;
}while(sign[0]=='1');
return(n+i);
}
int i=0;
char sign[50];
do {
printf("\t编号:");
scanf("\t%s",per[n+i].score);
fflush(stdin);
printf("\t姓名:");
scanf("\t%s",per[n+i].name);
printf("\t年龄:");
scanf("\t%s",per[n+i].age);
printf("\t性别:");
scanf("\t%s",per[n+i].sex);
printf("\t通讯住址:");
scanf("\t%s",per[n+i].adds);
printf("\t出生日期:");
scanf("\t%s",per[n+i].birthday);
fflush(stdin);
printf("\n\t是否继续添加");printf("\n\t1:是\t2:否\t ");
do{
scanf("\t%s",sign);
fflush(stdin);
if((sign[0]=='1'||sign[0]=='2')&&(sign[1]==NULL))
{
break;
}
else
printf("\t输入错误,重新输入!\t");
}while (1);
i++;
}while(sign[0]=='1');
return(n+i);
}