You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
2.0 KiB

6 years ago
#include<stdio.h>
#include<stdlib.h>
void Mangers()
{
int n,w=1,flag=0,i=3;
char s[8];
char password[7]="1";
do
{
printf("\n\nEnter password:");
scanf("%s",s);
if(!strcmp(s,password))
{
flag=1;
break;
}
else
{
printf("\n\nError! You only have %d times! Enter again:\n",i-1);
i--;
}
}
while(i>0);
if(!flag)
{
printf("you have Enter 3 times!");
exit(0);
}
do
{
system("cls");
printf("\n\n\t\t*********************<2A><><EFBFBD><EFBFBD>Ա<EFBFBD>˵<EFBFBD>***********************\n\n");
printf("\t\t\t\t1---<2D><><EFBFBD><EFBFBD><EFBFBD>γ<EFBFBD>\n");
printf("\t\t\t\t2---<2D><>ѯ<EFBFBD>γ<EFBFBD>\n");
printf("\t\t\t\t3---<2D><><EFBFBD>ӿγ<D3BF>\n");
printf("\t\t\t\t4---ɾ<><C9BE><EFBFBD>γ<EFBFBD>\n");
printf("\t\t\t\t5---<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>");
printf("\n\n\t\t******************************************************\n");
printf("Chiose your number(1-5):[ ]\b\b");
scanf("%d",&n);
switch(n)
{
case 1:prin();break;
case 2:search();break;
case 3:insert();savefile();break;
case 4:del();savefile();break;
case 5:return;
default:;
}
}
while(w==1);
}
void Students()
{
int n,w=1;
do
{
system("cls");
puts("\n\n\t\t*********************ѧ<><D1A7><EFBFBD>˵<EFBFBD>***********************\n\n");
puts("\t\t\t\t1---<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>пγ<D0BF>\n");
puts("\t\t\t\t2---<2D><>ѯ<EFBFBD>γ<EFBFBD><CEB3><EFBFBD>Ϣ\n");
puts("\t\t\t\t3---ѡ<><D1A1>ѡ<EFBFBD>޿γ<DEBF>\n");
puts("\t\t\t\t4---<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD>޵Ŀγ<C4BF>\n");
puts("\t\t\t\t5---ɾ<><C9BE><EFBFBD><EFBFBD>ѡ<EFBFBD>γ<EFBFBD>\n");
puts("\t\t\t\t6---<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>");
puts("\n\n\t\t****************************************************\n");
printf("Chiose your number(1-6):[ ]\b\b");
scanf("%d",&n);
switch(n)
{
case 1:prin();break;
case 2:search();break;
case 3:choose();break;
case 4:prin1();break;
case 5:del();savefile1();break;
case 6:return;
default:;
}
}
while(w==1);
}
int main()
{
int n,w=1;
do
{
system("cls");
puts("\n\n\t\t*********************MENU***********************\n\n");
puts("\t\t\t\t1.<2E>Թ<EFBFBD><D4B9><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ݵ<EFBFBD>¼(password 1)\n");
puts("\t\t\t\t2.<2E><>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>¼\n");
puts("\t\t\t\t3.<2E>˳<EFBFBD>");
puts("\n\n\t\t************************************************\n");
printf("Chiose your number(1-3):[ ]\b\b");
scanf("%d",&n);
switch(n)
{
case 1:Mangers() ;break;
case 2:Students();break;
case 3:w=0;break;
default:;
}
}
while(w==1);
return 0;
}