#include "main.h"
void find_id(int id)
{
int i=0;
for(i=0;iname);
/**********ID输入********************/
printf(" 请输入唯一ID(ID范围1----10000):");
scanf("%d",&temp->id);
while((temp->id)>10000 || (temp->id)<1)
{
printf(" 对不起,您输入的ID超出范围,请重新输入:");
scanf("%d",&temp->id);
}
/****************性别输入*******************/
printf(" 请输入性别:男 或者 女:");
scanf("%s",&temp->sex);
/****************年龄输入*************************/
printf(" 请输入年龄: ");
scanf("%d",&temp->age);
while((temp->age)>150||(temp->age)<1)
{
printf(" 对不起,您输入的年龄超出范围,请重新输入:");
scanf("%d",&temp->age);
}
return temp;
}
add_information(void)
{
while(1)
{
int key=2;
add_information_ui();
p= scanf_a_struct( &database[num] );
database[num] =*p;
num++;
printf(" 信息录入成功! \n");
printf(" 继续录入请按1;返回上一层界面请按0:");
scanf("%d",&key);
while(key!=0&&key!=1)
{
printf("***********************************