1 / 17
文档名称:

个人账簿管理系统源代码.doc

格式:doc   大小:55KB   页数:17页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

个人账簿管理系统源代码.doc

上传人:rovend 2021/10/21 文件大小:55 KB

下载得到文件列表

个人账簿管理系统源代码.doc

相关文档

文档介绍

文档介绍:个人账簿管理系统
源程序(带简要注释)
自定义头文件中内容:
#include <>
#include <>
#include <>
#include <>
#include <>
//常量定义
#define TRUE 1
#define ERROR 0
#define NOtFound -1
#define MAXNAME 20 //用户名的最大长度
//文件保存路径
#define FilePath1 "" //所有用户整体信息的二进制文件
#define FilePath2 "" //所有用户整体信息的文本文件
#define FilePath3 "" //单个用户信息的二进制文件
#define FilePath4 "" //单个用户信息的文本文件
#define FilePath5 "" //单月用户信息的二进制文件
#define FilePath6 "" //单月用户信息的文本文件
#define FilePath7 "" //说明文件
//函数返回值类型定义
typedef int Status;
//账单信息结构体
typedef struct AccountBook
{
int food; //食品费用
int rent; //房租费用
int education; //子女教育费用
int water; //水电费用
int medicine; //医疗费用
int TotalExpenses; //当月总消费
int saving; //当月储蓄
int income; //当月收入
int month; //月份
char username[MAXNAME+1]; //用户名
}Bill;
//查询信息结构体
typedef struct
{
int no;
int data;
}Sort;
void Menu(void); //主菜单
Status SearchMenu(Bill *q); //查找子菜单,并返回其状态
void input(Bill *q); //接收键盘数据输入
void WriteFile(Bill *q); //将信息读入文件
void FileOutput(void); //转换为文本文件输出
Status search(Bill *q); //查找数据,并返回其结果和状态
void SearchUser(Bill *q); //按用户查找并将数据保存到文件中并显示
void SearchMonth(Bill *q); //按月份查找并将数据保存到文件中并显示
void change(Bill *q,int mon,char *user); //修改数据后,更新文件中的相应记录并输出
void remove(int mon); //按月删除数据
void sort(Bill *q); //数据排序
void quit(void); //退出系统
void help(void); //说明文件,说明系统功能文件
中内容:
//包含头文件
#include ""
//主函数
int main()
{
char account[20]; //登陆用户名
char password[20]; //登陆密码
int i;
printf("\t\t********欢迎进入个人账簿管理系统********\n\n");
printf("\n\t\t\t请输入用户名和密码进入系统: \n");
printf("\t\t\t请输入用户名: ");
fflush(stdin);
gets(account);
printf("\t\t\t请输入密码: ");
fflush(stdin);
gets(password);
if((!strcmp(account,"yss") && !strcmp(password,"110")) ||
!strcmp(account,"guest") && !strcmp(pa