commit 1ead7be8abedb7dec2f9058360af279ff1f59762 Author: 3361638975@qq.com <3361638975@qq.com> Date: Sat Jan 12 10:24:33 2019 +0800 first commit diff --git a/源代码.c b/源代码.c new file mode 100644 index 0000000..7f1c2a4 --- /dev/null +++ b/源代码.c @@ -0,0 +1,226 @@ +#include +#include +#include +struct TXL +{ + char XM[20]; + char JG[20]; + char DHHM1[20]; + char DHHM2[20]; + char DZYX[20]; + char a[20]; + char b[20]; + char c[20]; + char d[20]; + char e[20]; +}; +struct TXL LXR[100]; +int num=0,p; +FILE *fp; + + void luru() + { + int i; + fp=fopen("D:\\ͨѶ¼.txt","a"); + for (i=0;i<100;i++) + { + int k; + printf ("\n"); + scanf ("%s",LXR[num].XM); + printf ("뼮\n"); + scanf ("%s",LXR[num].JG); + printf ("绰1\n"); + scanf ("%s",LXR[num].DHHM1); + printf ("绰2\n"); + scanf ("%s",LXR[num].DHHM2); + printf("\n"); + scanf("%s",LXR[num].DZYX); + num++; + p=num; + printf ("Ƿӣ10"); + scanf("%d",&k); + if (k==1) + continue; + + else + break; + + }; + fclose(fp); + } + void liulan () + { + int a,i=0; + if((fp=fopen("ͨѶ¼.txt","r"))==NULL) + printf ("¼Ϣ\n"); + printf(" 绰1 绰2 \n"); + while(fscanf(fp,"%s\n᣺%s\n绰1%s\n绰2%s\n䣺%s\n",&LXR[i].XM,&LXR[i].JG,&LXR[i].DHHM1,&LXR[i].DHHM2,&LXR[i].DZYX)!=EOF) + { + printf("%s %s %s %s %s\n",LXR[i].XM,LXR[i].JG,LXR[i].DHHM1,LXR[i].DHHM2,LXR[i].DZYX); + i++; + } + printf ("밴ĸַҳ"); + scanf("%s",&a); +fclose(fp); + + } + void chaxun() + { + int b,n; + char name[20]; + int k=0; + if((fp=fopen("ͨѶ¼.txt","r"))==NULL) + { + printf("޷ļ!\n"); + return; + } + while(fscanf(fp,"%s\n᣺%s\n绰1%s\n绰2%s\n䣺%s\n",&LXR[k].XM,&LXR[k].JG,&LXR[k].DHHM1,&LXR[k].DHHM2,&LXR[k].DZYX)!=EOF) + { + k++; + } + fclose(fp); + printf ("\n(Ϣδ¼ͨѶ¼ϵͳֱʾҳ)\n"); + scanf ("%s",&name); + for (n=0;n