diff --git a/开始界面.c b/开始界面.c new file mode 100644 index 0000000..c95d530 --- /dev/null +++ b/开始界面.c @@ -0,0 +1,205 @@ +#include"ļԼȡ1.c" +#include"Ͳ⺯.c" +#include"⺯Լ⺯.c" +void main()//ʼ +{ + int q=5000,p=5,t=1000; + int j,m=2,judge=0; + char flag='N'; + int N=0,i,sum,score=0,a; + printf("뽨ĿļĿ"); + scanf("%d",&N); + getchar(); + system("cls"); + ReadNode(N); + while(flag=='N'||flag=='n') + { + printf("\n \n\n ϵ\n\n ׼𣿣\n"); + printf("\t\t******************************************\n"); + printf("\t\t| ѡ׼ϵͳ |\n"); + printf("\t\t| |\n"); + printf("\t\t| 1. |\n"); + printf("\t\t| |\n"); + printf("\t\t| 2. |\n"); + printf("\t\t| |\n"); + printf("\t\t| 3. |\n"); + printf("\t\t| |\n"); + printf("\t\t| 4.⵽ļ |\n"); + printf("\t\t| |\n"); + printf("\t\t| 5.˳ϵͳ |\n"); + printf("\t\t******************************************\n"); + printf("\n\n"); + printf("\t\t ѡţ"); + scanf("%d",&a); + getchar(); + switch(a) + { + case 1:system("cls");// + char b; + printf("ҪĴĿ"); + scanf("%d",&sum); + getchar(); + answer(sum); + printf("\n"); + printf("س"); + scanf("%c",&b); + if(b=='\n') + { + system("cls"); + } + break; + case 2:system("cls");// + char code2[50]={"jiehe"},check2[50];//Ա + printf("Ա룺"); + for(j=1;j<=3;j++) + { + scanf("%s",check2); + getchar(); + system("cls"); + if(!strcmp(code2,check2)) + { + printf("ȷ\n"); + Sleep(t); + system("cls"); + judge=1; + break; + } + else + { + printf("%dλ\n",m); + m--; + if(m==1&&!strcmp(code2,check2)) + { + printf("ȷ\n"); + Sleep(t); + system("cls"); + judge=1; + break; + } + if(m==0&&!strcmp(code2,check2)) + { + printf("ȷ\n"); + Sleep(t); + system("cls"); + judge=1; + break; + } + else + judge=2; + } + } + m=2; + if(judge==1) + { + InsertNode(N); + } + N++; + system("cls"); + if(judge==2) + { + while (p>0) + { + printf("\n\n\n\n\n\n\n\n\n\n"); + printf("\t\t\tǷǷ룡\n"); + printf("\t\t\tԶؿʼ棡\n"); + printf("\t\t\t룡\n"); + printf("\t\t\tʱ仹ʣ%d",p); + Sleep(1000); + system("cls"); + p--; + } + } + p=5; + system("cls"); + break; + case 3:system("cls");// + char code1[50]={"jiehe"},check1[50];//Ա + printf("Ա룺"); + for(j=1;j<=3;j++) + { + scanf("%s",check1); + getchar(); + system("cls"); + if(!strcmp(code1,check1)) + { + printf("ȷ\n"); + Sleep(t); + system("cls"); + judge=1; + break; + } + else + { + printf("%dλ\n",m); + m--; + if(m==1&&!strcmp(code1,check1)) + { + printf("ȷ\n"); + Sleep(t); + system("cls"); + judge=1; + break; + } + if(m==0&&!strcmp(code1,check1)) + { + printf("ȷ\n"); + Sleep(t); + system("cls"); + judge=1; + break; + } + else + judge=2; + } + } + m=2; + if(judge==1) + { + InputTitle(N); + } + system("cls"); + if(judge==2) + { + while (p>0) + { + printf("\n\n\n\n\n\n\n\n\n\n"); + printf("\t\t\tǷǷ룡\n"); + printf("\t\t\tԶؿʼ棡\n"); + printf("\t\t\t룡\n"); + printf("\t\t\tʱ仹ʣ%d",p); + Sleep(1000); + system("cls"); + p--; + } + } + p=5; + system("cls"); + break; + case 4:system("cls");//⵽ļ + char c; + if(SaveNode(N)) + printf("ɹ!\n"); + else printf("ʧ!\n"); + printf("\n"); + printf("س"); + scanf("%c",&c); + if(c=='\n') + { + system("cls"); + } + break; + case 5:system("cls");//˳ϵͳ + printf("㽫˳ϵͳY or N?)\n"); + scanf("%c",&flag); + getchar(); + if(flag=='Y'||flag=='y') + exit(0); + system("cls"); + break; + default:system("cls"); + printf("ȷѡ\n"); + Sleep(t); + system("cls"); + } + } +} diff --git a/开始界面.exe b/开始界面.exe new file mode 100644 index 0000000..e088c35 Binary files /dev/null and b/开始界面.exe differ