小区水电费管理系统 下载本文

内容发布更新时间 : 2024/9/20 22:43:40星期一 下面是文章的全部内容请认真阅读。

#include #include #include

#define w 1.8/*水1.8元/吨*/ #define e 0.5/*电0.5元/度*/

struct user{ char name[10],ID[20];/*用户的姓名和身份证号码*/ double water,electricity;/*用水(吨)、电(度)量*/ double monney;/*总共的水电费用*/ }u[100];/*用户最大容量为100*/

void main(){ int choice=0; GOTO7:system(\

printf(\

printf(\ 欢迎进入水电费管理系统^_^ |\\n\ printf(\

printf(\住户管理\\n\\t\\t\\t2.单价设置\\n\\t\\t\\t3.费用收取\\n\\t\\t\\t4.费用查询统计及单据显示\\n\\t\\t\\t5.退出\\n\ printf(\请输入您的选择:\GOTO8:scanf(\ switch(choice) {case 1: m_user(); system(\ goto GOTO7; case 2: p_she(); system(\ goto GOTO7; case 3: p_shou(); system(\ goto GOTO7; case 4: p_cha(); system(\ goto GOTO7; case 5: break; default: printf(\您的输入有误,请重新输入:\ goto GOTO8;

}

/*住户管理*/ void m_user(){ int choice=0; GOTO3:system(\ printf(\ printf(\ 住户管理^_^ |\\n\ printf(\ printf(\住户基本数据管理\\n\\t\\t\\t2.缴费状态查询\\n\\t\\t\\t3.数据结转\\n\\t\\t\\t4.退出\ printf(\请输入您的选择:\GOTO4:scanf(\ switch(choice) { case 1: display1(); system(\ goto GOTO3; case 2: situation(); system(\ goto GOTO3; case 3: turn(); system(\ goto GOTO3; case 4: break; default: printf(\输入有误,请重新输入:\ goto GOTO4; } }

/*住户基本数据管理*/ void display1(){ int choice=0; GOTO1:system(\ printf(\ printf(\ 住户管理^_^ |\\n\ printf(\ printf(\显示用户信息\\n\\t\\t\\t2.添加用户\\n\\t\\t\\t3.修改用户信息\\n\\t\\t\\t4.删除用户信

息\\n\\t\\t\\t5.退出\ printf(\请输入您的选择:\GOTO2:scanf(\ switch(choice) { case 1: display(); system(\ goto GOTO1; case 2: add(); system(\ goto GOTO1; case 3: alter(); system(\ goto GOTO1; case 4: delete_(); system(\ goto GOTO1; case 5: break; default: printf(\输入有误,请重新输入:\ goto GOTO2; } }

/*显示用户信息*/ void display(){ int n;/*确定当前用户的人数*/ int i; for(n=0;n<100;n++) if(u[n].monney==0) break; if(n==0) printf(\系统无用户,需要添加!^_^\\n\ else for(i=0;i

/*添加用户*/ void add(){