电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

C语言家庭财务管理系统代码

C语言家庭财务管理系统代码_第1页
1/27
C语言家庭财务管理系统代码_第2页
2/27
C语言家庭财务管理系统代码_第3页
3/27
#include #include #include struct Data { char name[20]; char riqi[8]; float money; char beizhu[50]; }; struct list { struct Data info; struct list *next; }; struct list *Inhead=NULL; struct list *Intail=NULL; struct list *zhichuhead=NULL; struct list *zhichutail=NULL; struct list *temp=NULL; void chaxun_income(); void chaxun_zhichu(); void xiugai_income(); void xiugai_zhichu(); void Save_income() { FILE *fp; fp=fopen("D:\家庭财务管理.txt","w"); struct list *p = Inhead; while(p != NULL) { fwrite(&p->info, sizeof(struct Data), 1, fp); p = p->next; } fclose(fp); } void Save_zhichu() { FILE *fp; fp=fopen("D:\家庭财务管理支出.txt","w"); struct list *p = zhichuhead; while(p != NULL) { fwrite(&p->info, sizeof(struct Data), 1, fp); p = p->next; } fclose(fp); } void Open() { FILE *fp; fp=fopen("D:\家庭财务管理.txt","r"); if(fp!=NULL) { struct Data linshi; while(fread(&linshi, sizeof(struct Data), 1, fp) == 1) { temp=(struct list*)malloc(sizeof(struct list)); temp->info=linshi; temp->next=NULL; if(Inhead == NULL) { Inhead = temp; Intail = temp; } else { Intail->next = temp; Intail = temp; } } fclose(fp); } } void Menu() { system("cls"); printf("\n"); printf("\n"); printf("\n"); printf("\n"); printf("******************\n"); printf("欢迎使用家庭财务管理系统\n"); printf("******************\n"); printf(" \n"); printf(" 1:收入操作 \n"); printf(" 2:支出操作 \n"); printf(" 3:统计操作 \n"); printf(" 0:退出 \n"); } void Openzhichu() { FILE *fp; fp=fopen("D:\家庭财务管理支出.txt","r"); if(fp!=NULL) { struct Data linshi; while(fread(&linshi, sizeof(struct Data), 1, fp) == 1) { temp=(struct list*)malloc(sizeof(struct list)); temp->info=linshi; temp->next=NULL; if(zhichuhead == NULL) { zhichuhead = temp; zhichutail = temp; } else { zhichutail->...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

C语言家庭财务管理系统代码

小辰8+ 关注
实名认证
内容提供者

出售各种资料和文档

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部