课程设计论文-用c实现水电煤气管理系统内容摘要:

tw(8)用电量 | setw(8)用煤气量 | setw(8)要缴的费用 endl。 userdisplay()。 } else if(o==4) { ()。 ()。 } else return。 } void add() { cout endl endl 作 endl。 cout请输入你要进行的操作 :endl。 int o。 cino。 string id。 float water。 float power。 float gas。 if(o==1||o==2) { User*user。 StuFile sf。 TeacherFile tf。 cout请输入他的身份证号 :。 cinid。 user=(id)。 if(user==0) user=(id)。 if(user==0) { cout资料库中没有该身份证号的用户 !endl。 return。 } cout该用户的信息是 :endl。 cout|setw(18)身份证号 | setw(8)姓名 | setw(8)用水量 | setw(8)用电量 | setw(8)用煤气量 | setw(8)要缴的费用 endl。 userdisplay()。 cout请输入他的用水量 :。 cinwater。 cout请输入他的用电量 :。 cinpower。 cout请输入他的用煤气量 :。 cingas。 usersetWater(water)。 usersetPower(power)。 usersetGas(gas)。 } else return。 } void handed() { cout请输入要缴费的人的身份证号 :。 string id。 cinid。 User*user。 StuFile sf。 TeacherFile tf。 user=(id)。 if(user==0) user=(id)。 if(user==0) { cout资料库中没有该身份证号的用户 !endl。 return。 } cout该用户的信息是 :endl。 cout|setw(18)身份证号 | setw(8)姓名 | setw(8)用水量 | setw(8)用电量 | setw(8)用煤气量 | setw(8)要缴的费用 endl。 userdisplay()。 cout请输入他的缴费金额 :。 float money。 cinmoney。 usersetMoney(money)。 cout缴费成功 \n。 } int mainMenu() { coutendlendl。 cout ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ endl。 cout ☆ ☆ endl。 cout ☆ 水电煤气管理系统 ☆ endl。 cout ☆ ☆ endl。 cout ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ endl。 coutendl。 cout endl。 cout endl。 cout endl。 cout endl。 cout endl。 int a。 char c[20]。 do { cout 请选择相应的功能 (04):endl。 coutendl。 cina。 gets(c)。 if(a0||a4) { coutendlendl。 cout请确认您输入的数 字在 0~4 之间 !endl。 cout请重新输入一遍 !endlendl。 } } while(a0||a4)。 return a。 } void work() { switch(mainMenu()) { case 1: init()。 break。 case 2: select()。 break。 case 3: add()。 break。 case 4: handed()。 break。 default: break。 } } void Menu() { coutendl。 cout ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ endl。 cout ☆ ☆ endl。 cout ☆ 水电煤气管理系统 ☆ endl。 cout ☆ ☆ endl。 cout ☆ 杨振坡 ☆ endl。 cout ☆ ☆ endl。 cout ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ endl。 coutendl。 system(pause)。 system(cls)。 } void main() { system(color 3A)。 Menu()。 char a=39。 y39。 while(a==39。 y39。 ) { work()。 cout是否继续使用该系统 (y/n)endl。 cina。 } } //StuFile 类,对学生信息的操作 //TeacherFile 类,对教工信息的操作 incl。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。