个人帐务管理系统

上传人:kms****20 文档编号:40445902 上传时间:2018-05-26 格式:DOC 页数:25 大小:59.50KB
返回 下载 相关 举报
个人帐务管理系统_第1页
第1页 / 共25页
个人帐务管理系统_第2页
第2页 / 共25页
个人帐务管理系统_第3页
第3页 / 共25页
个人帐务管理系统_第4页
第4页 / 共25页
个人帐务管理系统_第5页
第5页 / 共25页
点击查看更多>>
资源描述

《个人帐务管理系统》由会员分享,可在线阅读,更多相关《个人帐务管理系统(25页珍藏版)》请在金锄头文库上搜索。

1、个人帐务管理系统个人帐务管理系统个人帐务管理系统.txt 其实全世界最幸福的童话,不过是一起度过柴米油盐的岁月。一个人愿意等待,另一个人才愿意出现。感情有时候只是一个人的事,和任何人无关。爱,或者不爱,只能自行了断。#include #include #include #include #include #include #include #define N 500 /允许录入的最多帐务次数 class account public: char a; /备注选项 struct date int year; int month; int day; time; long double all_ti

2、me; /时间总数 char name20; /收支项名称 int type; /收支类型 long double money; /收支金额 char remarks100; /备注 ; void menu(); /菜单函数 void add(account cd,int no, int n); / 输入帐务明细 void input(account cd,int n); /输入 n 次帐务明细 void sort_suma(account cd,int n); /n 次帐务按总收入排序 void sort_sumb(account cd, int n); /n 次帐务按日期排序 void s

3、ort_sumc(account cd, int n); /n 次帐务按名称排序 void seek_a(account cd,int i, int n); /按序号查找帐务信息 int seek_b(account cd,int x,int y,int z, int n); /按日期查找帐务信息 int seek_c(account cd,char na, int n); /按名称查找帐务信息 int seek_d(account cd,long double no,int a, int n); /按金额查找帐务信息 int dela(account cd,int no, int n); /

4、按序号删除序号为 no的帐务信息 int delb(account cd,int x,int y,int z, int n); /按日期删除序号为 no 的帐务信息 int delc(account cd,char na, int n); /按名称删除序号为no 的帐务信息 int ins(account cd,int no, int n); /新增帐务 void mod1(account cd,int no, int n); /按序号修改帐务信息 void print(account cd,int n); /打印所有帐务信息 void printall(account cd,int X,in

5、t Y,int Z,int x,int y,int z,int n); /按日期打印帐务统计信息 int getin(account cd, int n); /把帐务信息存入文件中 int ReadBiFile(char *filename, account cd); /从文件中读取帐务信息 void main() ofstream fout; account stuN; int choice,i,a,b,c,A,B,C; char name120; long double mon; int n; /帐务数 coutchoice; switch (choice) case 1: coutn;

6、input(stu,n); /录入 n 个帐务信息 menu(); break; case 2: couti; if(i=1) sort_suma(stu,n); /按金额排序 else if(i=2) /按日期排序 sort_sumb(stu,n); else if(i=3) /按名称排序 sort_sumc(stu,n); menu(); break; case 3: couti; switch (i) case 1: couti; seek_a(stu,i,n); /按序号查找帐务信息 menu(); break; case 2: coutabc; seek_b(stu,a,b,c,n)

7、; /按日期查找帐务信息 menu(); break; case 3: coutname1; seek_c(stu,name1,n); /按名称查找帐务信息 menu(); break; case 4: couti; coutmon; seek_d(stu,mon,i,n); /按金额查找帐务信息 menu(); break; default: couti; if(i=1) couti; n=dela(stu,i,n);/按序号删除帐务信息 else if(i=2) coutabc; n=delb(stu,a,b,c,n); /按日期删除帐务信息 else if(i=3) coutname1;

8、 n=delc(stu,name1,n); /按名称删除帐务信息 menu(); break; case 5: couti; n=ins(stu,i,n); /按序号新增帐务信息 menu(); break; case 6: couti; if(i=1) couti; mod1(stu,i,n); /按序号修改帐务信息 else if(i=2) coutabc; i=seek_b(stu,a,b,c,n); /按日期修改帐务信息 mod1(stu,i,n); else if(i=3) coutname1; i=seek_c(stu,name1,n); /按名称修改帐务信息 mod1(stu,i

9、,n); menu(); break; case 7: print(stu,n); /输出帐务信息 menu(); break; case 8:coutABC; coutabc; sort_sumb(stu,n); printall(stu,A,B,C,a,b,c,n); menu(); break; case 9: getin(stu,n); menu(); break; case 10: coutname1; n=ReadBiFile(name1, stu); menu(); break; case 11: exit(0); break; default: cout的方式输入日期:“cdn

10、o.time.yearcdno.time.monthcdno.time.day; while(cdno.time.year2008 | cdno.time.month12 |cdno.time.month31); cdno.all_time=cdno.time.year*10000 + cdno.time.month*100 + cdno.time.day; coutcdno.name; do coutcdno.type; while(cdno.type!=1 if(cdno.type=1) coutcdno.money; else coutcdno.money; coutcdno.a; if

11、 (cdno.a=y) coutcdno.remarks; /输入 n 个帐务信息 void input(account cd,int n) int i; for(i=0;i=0 return array0; /按名称查找帐务信息 int seek_c(account cd,char na, int n) int i,j=0; int array100=0; int sign=0; coutarray0; return array0; /按金额查找帐务信息 int seek_d(account cd,long double no, int a,int n) int i,j=0; int arr

12、ay100=0; int sign=0; coutarray0; return array0; /按序号删除序号为 no 的帐务信息 int dela(account cd,int no, int n) if(no=n|non|nono;i-) cdi=cdi-1; add(cd, no, n); +n; return n; /按序号修改序号为 no 的帐务信息 void mod1(account cd,int no, int n) if(no=n|no=0 ) add( cd, no, n); /打印 n 个帐务信息 void print(account cd,int n) int i; c

13、outa1) if(cdi.a=2) cdi.money=-cdi.money; all+=cdi.money; coutname1; ofstream out(name1); if(!out) cout“open output file:“name1“ error“endl; exit(1); for(i=0;in;i+) out.write(char *) /实在参数自己填写,此处可以用循环一次写入一条记录 out.close( ); return 1; /从文件中读取帐务信息 int ReadBiFile(char *filename, account cd) ifstream in(filename); if(!in) cout“open input file:“filename“ error“endl; exit(1); int i=0; in.read(char *) /if(in.eof( ) / i+; while (!in.eof( ) i+; in.read(char *) in.close( ); return i;

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 科普知识

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号