void func11()
}
int comp(char s1[],char s2[])
{
int i=0;
while(s1[i]!='\0'&&s2[i]!='\0'&&s1[i]==s2[i])
i++;
if(s1[i]=='\0'||s2[i]=='\0')
return 1;
else
return 0;
}
void main()
{
int sel;
do
{
cout<<"请输入(1:输入数据 2:输出数据 3:按姓名查询"<<endl<<"4:添加数据 5:逻辑删除 6:物理删除 7:修改记录 其它退出";
cin>>sel;
switch(sel)
{
case 1:
char a,b;
while(1)
{
cout<<"请输入你所选择的操作对象(学生(1),老师(2),研究生(3)):";
cin>>a;
if(a=='1')
func1();
else if(a=='2')
func7();
else if(a=='3')
func03();
else
cout<<"输入错误!"<<endl;
cout<<"继续吗?(Y/N)";
cin>>b;
while(b!='y'&&b!='Y'&&b!='n'&&b!='N')
{
cout<<"对不起,你输入错误!请重新输入:";
cin>>b;
}
if(b=='n'||b=='N')
break;
}
break;
case 2:
char c,d;
while(1)
{
cout<<"请输入你所选择的操作对象(学生(1),老师(2),研究生(3)):";
cin>>c;
if(c=='1')
func2();
else if(c=='2')
func8();
else if(c=='3')
func04();
else
cout<<"输入错误!"<<endl;
cout<<"继续吗?(Y/N)";
cin>>d;
while(d!='y'&&d!='Y'&&d!='n'&&d!='N')
{
cout<<"对不起,你输入错误!请重新输入:";
cin>>d;
}
if(d=='n'||d=='N')
break;
}
break;
case 3:
char e,f;
while(1)
{
cout<<"请输入你所选择的操作对象(学生(1),老师(2),研究生(3)):";
cin>>e;
if(e=='1')
func3();
else if(e=='2')
func9();
else if(e=='3')
func04();
else
cout<<"输入错误!"<<endl;
cout<<"继续吗?(Y/N)";
cin>>f;
while(b!='y'&&b!='Y'&&b!='n'&&b!='N')
{
cout<<"对不起,你输入错误!请重新输入:";
cin>>f;
}
if(f=='n'||f=='N')
break;
}
break;
case 4:
char g,h;
while(1)
{
cout<<"请输入你所选择的操作对象(学生(1),老师(2),研究生(3)):";
cin>>g;
if(g=='1')
func4();
else if(g=='2')
func0();
else if(g=='3')
func06();
else
cout<<"输入错误!"<<endl;
cout<<"继续吗?(Y/N)";
cin>>h;
while(h!='y'&&h!='Y'&&h!='n'&&h!='N')
{
cout<<"对不起,你输入错误!请重新输入:";
cin>>h;
}
if(h=='n'||h=='N')
break;
}
break;
case 5:
char m,n;
while(1)
{
cout<<"请输入你所选择的操作对象(学生(1),老师(2),研究生(3)):";
cin>>m;
if(m=='1')
func5();
else if(m=='2')
func01();
else if(m=='3')
func07();
else
cout<<"输入错误!"<<endl;
cout<<"继续吗?(Y/N)";
cin>>n;
while(n!='y'&&n!='Y'&&n!='n'&&n!='N')
{
cout<<"对不起,你输入错误!请重新输入:";
cin>>n;
}
if(n=='n'||n=='N')
break;
}
break;
case 6:
char x,z;
while(1)
{
cout<<"请输入你所选择的操作对象(学生(1),老师(2),研究生(3)):";
cin>>x;
if(x=='1')
func6();
else if(x=='2')
func02();
else if(x=='3')
func08();
else
cout<<"输入错误!"<<endl;
cout<<"继续吗?(Y/N)";
cin>>z;
while(z!='y'&&z!='Y'&&z!='n'&&z!='N')
{
cout<<"对不起,你输入错误!请重新输入:";
cin>>z;
}
if(z=='n'||z=='N')
break;
}
break;
case 7:
char s,t;
while(1)
{
cout<<"请输入你所选择的操作对象(学生(1),老师(2),研究生(3)):";
cin>>s;
if(s=='1')
func09();
else if(s=='2')
func10();
else if(s=='3')
func11();
else
cout<<"输入错误!"<<endl;
cout<<"继续吗?(Y/N)";
cin>>t;
while(t!='y'&&t!='Y'&&t!='n'&&t!='N')
{
cout<<"对不起,你输入错误!请重新输入:";
cin>>t;
}
if(t=='n'||t=='N')
break;
}
break;
default:
cout<<"输入错误!"<<endl;
break;
}
}
while(sel>=1&&sel<=6);
}