![用C语言开发小型数据库管理系统代码_第1页](http://file3.renrendoc.com/fileroot_temp3/2022-2/2/2d7634c2-9539-40a8-b570-eae6c905f3af/2d7634c2-9539-40a8-b570-eae6c905f3af1.gif)
![用C语言开发小型数据库管理系统代码_第2页](http://file3.renrendoc.com/fileroot_temp3/2022-2/2/2d7634c2-9539-40a8-b570-eae6c905f3af/2d7634c2-9539-40a8-b570-eae6c905f3af2.gif)
![用C语言开发小型数据库管理系统代码_第3页](http://file3.renrendoc.com/fileroot_temp3/2022-2/2/2d7634c2-9539-40a8-b570-eae6c905f3af/2d7634c2-9539-40a8-b570-eae6c905f3af3.gif)
![用C语言开发小型数据库管理系统代码_第4页](http://file3.renrendoc.com/fileroot_temp3/2022-2/2/2d7634c2-9539-40a8-b570-eae6c905f3af/2d7634c2-9539-40a8-b570-eae6c905f3af4.gif)
![用C语言开发小型数据库管理系统代码_第5页](http://file3.renrendoc.com/fileroot_temp3/2022-2/2/2d7634c2-9539-40a8-b570-eae6c905f3af/2d7634c2-9539-40a8-b570-eae6c905f3af5.gif)
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、#include #include typedef struct count /*/char name10;int num;count;typedef struct stchar name10;long Number;int Math;int C;int Amount;st;st record8;count num1; char filename10=0;char filename210=0;int Inputnum8;void MainMenu( /*/printf(ntttt* * * * * * * * * *n;printf(tttt* *n;printf(tttt* 1. *n;pr
2、intf(tttt* 2. *n;printf(tttt* 3. *n;printf(tttt* 4. *n;printf(tttt* 5. *n;printf(tttt* 6. *n;printf(tttt* * * * * * * * * *n;void DelMenu( /*/printf(ntttt* * * * * * * * * * * *n;printf(tttt* *n;printf(tttt* 1. *n;printf(tttt* 2. *n;printf(tttt* * * * * * * * * * * *n;void RankingMenu( /*/printf(ntt
3、tt* * * * * * * * * * * *n;printf(tttt* *n;printf(tttt* 1. *n;printf(tttt* 2. C *n;printf(tttt* 3. *n;printf(tttt* 4. *n;printf(tttt* * * * * * * * * * * *n;void InquireMenu( /*/printf(ntttt* * * * * * * * * * * *n;printf(tttt* *n;printf(tttt* 1. *n;printf(tttt* 2. *n;printf(tttt* 3. *n;printf(tttt*
4、 4. C *n;printf(tttt* 5. *n;printf(tttt* 6. *n;printf(tttt* * * * * * * * * * * *n;char Inputfilename( /*/char str2=B;printf(* * : ;scanf(%s,filename;getchar(;strcpy(filename2,filename;strcat(filename2,str2;FILE *readfile( /*/FILE *fp1;if(fp1=fopen(filename,rb=NULLprintf(n!n;fclose(fp1;return(fp1;FI
5、LE *foundfile( /*/FILE *fp1;if(fp1=fopen(filename,wb=NULLprintf(n!n;fclose(fp1;return(fp1;FILE *savefile( /*/FILE *fp1;if(fp1=fopen(filename,ab=NULLprintf(n!n;fclose(fp1;return(fp1;int InputSave( /* */int i=0,j;char ch=y;while(ch!=wi=i+1;printf(n* ( * :;scanf(%s,;Loop1: printf(n* ( * :;s
6、canf(%ld,&recordi.Number;if(i!=1for(j=1;j if(recordi.Number=recordj.Numberprintf(nt! ! %d%d!n,i,j;printf(nt!n;goto Loop1; Loop2: printf(n* ( * :;scanf(%d,&recordi.Math;if(recordi.Math100|recordi.Math100|recordi.C=Mathprintf(nName:%-10s Num:%3ld Math:%3d C:%3d Amount:%3dn,,recordj.Number,
7、recordj.Math,recordj.C,recordj.Amount;void C_inquire( /*C*/int C,j,time;FILE *fp1,*fp2;fp1=readfile(;fp2=readfile2(; /*(*/time=ReadComputer2Two(fp2; /*/ReadComputer2(time,fp1; /*(2*/fclose(fp1;fclose(fp2;printf(C:;scanf(%d,&C;/*getchar(;*/for(j=1;j if(recordj.C=Cprintf(nName:%-10s Num:%3ld Math:%3d
8、C:%3d Amount:%3dn,,recordj.Number,recordj.Math,recordj.C,recordj.Amount;void Amount_inquire( /*/int Amount,j,time;FILE *fp1,*fp2;fp1=readfile(;fp2=readfile2(; /*(*/time=ReadComputer2Two(fp2; /*/ReadComputer2(time,fp1; /*(2*/fclose(fp1;fclose(fp2;printf(:;scanf(%d,&Amount;/*getchar(;*/for
9、(j=1;j if(recordj.Amount=Amountprintf(nName:%-10s Num:%3ld Math:%3d C:%3d Amount:%3dn,,recordj.Number,recordj.Math,recordj.C,recordj.Amount;/* * * */void Num_inquire_Del( /*/char ch;int num,j,k,time;FILE *fp1,*fp2;fp1=readfile(; /*/fp2=readfile2(; /*/time=ReadComputer2Two(fp2; /*/ReadCom
10、puter2(time,fp1; /*(2*/fclose(fp1;fclose(fp2;printf(:;scanf(%ld,#getchar(;for(j=1;j=time;j+if(recordj.Number=numprintf(nName:%-10s Num:%3ld Math:%3d C:%3d Amount:%3dn,,recordj.Number,recordj.Math,recordj.C,recordj.Amount;k=j;printf(nt* =y =n * : ;if(ch=getchar(=yif(k=timetime=time-1;else
11、 for(j=k;j recordj=recordj+1;time=time-1;fp1=foundfile(; /*/SaveFile2(time,fp1; /*(2*/fp2=foundfile2(; /*/Additive2Two(time,fp2; /*/printf(n!%d!n,time;fclose(fp1;fclose(fp2;else printf(n!n;/* * * */void Math_ranking(int i /*/int j,k;st time;for(j=1;j for(k=1;krecordk+1.Mathtime=recordk;recordk=recor
12、dk+1;recordk+1=time;printf(n;for(j=1;j printf(nName:%-10s Num:%3ld Math:%3d C:%3d Amount:%3dn,,recordj.Number,recordj.Math,recordj.C,recordj.Amount;void C_ranking(int i /*C*/int j,k;st time;for(j=1;j for(k=1;krecordk+1.Ctime=recordk;recordk=recordk+1;recordk+1=time;printf(n;for(j=1;j pri
13、ntf(nName:%-10s Num:%3ld Math:%3d C:%3d Amount:%3dn,,recordj.Number,recordj.Math,recordj.C,recordj.Amount;void Amount_ranking(int i /*/int j,k;st time;for(j=1;j for(k=1;krecordk+1.Amounttime=recordk;recordk=recordk+1;recordk+1=time;printf(n;for(j=1;j printf(nName:%-10s Num:%3ld Math:%3d
14、C:%3d Amount:%3dn,,recordj.Number,recordj.Math,recordj.C,recordj.Amount;/* * * */main(FILE *fp,*ffp;int temp1=0,temp2=0,temp3;char ch,location;MainMenu(;location=1;printf(n 1 - 6 (:;while(ch=getchar(!=0if(ch=6&(location=1getchar(;printf(nnttt* Y= n= *n;printf(nnttINPUT:;if(ch=getchar(=np
15、rintf(nnttt !;exit(;break;else MainMenu(;location=1;printf(n 1 - 6 (:;if(ch=1&(location=1temp1=InputSave(; /* */getchar(;printf(tt* y= n= * : ;if(ch=getchar(=yInputfilename(; /*/fp=foundfile(; /*/SaveFile2(temp1,fp; /*(2*/fclose(fp;ffp=foundfile2(; /*(*/Additive2Two(temp1,ffp; /*/fclose(ffp;printf(%
16、d!n,temp1;else printf(t !n;temp1=0;temp2=0;MainMenu(;location=1;printf(n 1 - 6 (:;continue;if(ch=2&(location=1getchar(; printf(nt * y= n= * : ;if(ch=getchar(=yfp=savefile(; /*/else Inputfilename(; /*/fp=savefile(;temp1=InputSave(; /* */temp3=temp1;SaveFile2(temp1,fp; /*(2*/fclose(fp;ffp=readfile2(;
17、/*/temp2=ReadComputer2Two(ffp; /*/fclose(ffp;temp1=temp1+temp2;ffp=foundfile2(; /*/Additive2Two(temp1,ffp; /*/fclose(ffp;printf(n%d!%d!n,temp3,temp1;temp1=0;temp2=0;MainMenu(;location=1;printf(n 1 - 6 (:;continue;if(ch=3&(location=1DelMenu(;location=2;printf(n 1 - 3 (:;while(ch=getchar(!=0if(ch=1&(l
18、ocation=2getchar(;printf(ntt * - *n;printf(nt * y= n= * : ;if(ch=getchar(=y /*/else Inputfilename(; /*/Num_inquire_Del(; /*/DelMenu(;location=2;printf(n 1 - 3 (:;continue;if(ch=2&(location=2MainMenu(;location=1;printf(n 1 - 6 (:;break;if(ch=4&(location=1RankingMenu(;location=3;printf(n 1 - 4 (:;whil
19、e(ch=getchar(!=0if(ch=1&(location=3getchar(;printf(ntt * - *n;printf(nt * y= n= * : ;if(ch=getchar(=y /*/else Inputfilename(;fp=readfile(; /*/ffp=readfile2(; /*(*/temp1=ReadComputer2Two(ffp; /*/ fclose(ffp;ReadComputer2(temp1,fp; /*(2*/fclose(fp;Math_ranking(temp1; /*/temp1=0;temp2=0;RankingMenu(;lo
20、cation=3;printf(n 1 - 4 (:;continue;if(ch=2&(location=3getchar(;printf(ntt * - C*n;printf(nt * y= n= * : ;if(ch=getchar(=y /*/else Inputfilename(;fp=readfile(; /*/ffp=readfile2(; /*(*/temp1=ReadComputer2Two(ffp; /*/fclose(ffp;ReadComputer2(temp1,fp; /*(2*/fclose(fp;C_ranking(temp1; /*/temp1=0;temp2=
21、0;RankingMenu(;location=3;printf(n 1 - 4 (:;continue;if(ch=3&(location=3getchar(;printf(ntt * - *n;printf(nt * y= n= * : ;if(ch=getchar(=y /*/else Inputfilename(;fp=readfile(; /*/ffp=readfile2(; /*(*/temp1=ReadComputer2Two(ffp; /*/fclose(ffp;ReadComputer2(temp1,fp; /*(2*/fclose(fp;Amount_ranking(tem
22、p1; /*/temp1=0;temp2=0;RankingMenu(;location=3;printf(n 1 - 4 (:;continue;if(ch=4&(location=3MainMenu(;location=1;printf(n 1 - 6 (:;break;if(ch=5&(location=1InquireMenu(;location=4;printf(n 1 - 6 (:;while(ch=getchar(!=0if(ch=1&(location=4getchar(;printf(ntt * - *n;printf(nt * y= n= * : ;if(ch=getchar(=y /*/else Inputfilename(;Num_inquire(; /*/InquireMenu(;location=4;printf(n 1 - 6 (:;continue;if(ch=2&(location=4getchar(;prin
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 固体饮料的电商渠道合作模式考核试卷
- 2025-2030年历史战争场景重现缆车行业深度调研及发展战略咨询报告
- 2025-2030年可穿戴血压监测与调节器企业制定与实施新质生产力战略研究报告
- 内陆养殖环境风险评估与管理考核试卷
- 2025-2030年户外多功能工具企业制定与实施新质生产力战略研究报告
- 2025年度教师学术交流与合作合同
- 2025-2030年厨电全渠道营销平台企业制定与实施新质生产力战略研究报告
- 2025-2030年口腔综合治疗椅舒适度提升方案企业制定与实施新质生产力战略研究报告
- 大数据在智慧城市中的应用模式考核试卷
- 意外伤害保险客户满意度调查与分析考核试卷
- GB/T 8014.1-2005铝及铝合金阳极氧化氧化膜厚度的测量方法第1部分:测量原则
- 股票基础知识(入市必读)-PPT
- eNSP简介及操作课件
- 公文与公文写作课件
- 运动技能学习与控制课件第七章运动技能的协调控制
- 节后复工吊篮验收表格
- 基于振动信号的齿轮故障诊断方法研究
- 医疗器械分类目录2002版
- DB11_T1713-2020 城市综合管廊工程资料管理规程
- 气管套管滑脱急救知识分享
- 压缩空气系统管道阻力计算
评论
0/150
提交评论