【正文】
not finish chummage*********\n)。} } } void search() {char name[20]。 for(i=301。 } if(room[i301].flag==1) {printf(\n message: %d %s %s\n,i,room[i301].name[0],room[i301].sex[0])。 scanf(%d,amp。i306。 } } if(n==2) { printf(Please input the room number :)。 else if(room[m301].flag==2) {printf(\n\n\t\tnum\t name1\t sex\tname2\tsex\n)。 } } if(n!=1amp。} } 4. 功能模塊的具體設(shè)計(jì) 主界面分析 入住功能的界面 hotel’s management system ************* Wele to the hotel ************* Please choose a option: 1. Check in 2. Check out 3. Search 4. Show customer’s message 5. quit option: hotel’s management system ************* Wele to the hotel ************* Please choose a option: 1. Check in 2. Check out 3. Search 4. Show customer’s message 5. quit option: ***please choose person person 1 please input name and sex: 10 退房功能的界面 查找功能的界面 hotel’s management system ************* Wele to the hotel ************* Please choose a option: 1. Check in 2. Check out 3. Search 4. Show customer’s message 5. quit option:2 please input a name or a room number: hotel’s management system ************* Wele to the hotel ************* Please choose a option: 1. Check in 2. Check out 3. Search 4. Show customer’s message 5. quit option:3 please input a name: 11 顯示功能的界面 5. 程序設(shè)計(jì)中的數(shù)據(jù)設(shè)計(jì) 在程序中使用了結(jié)構(gòu)體和結(jié)構(gòu)體數(shù)組,如: struct hotel {char name[2][20]。 其中: char name[2][20]。 void checkin(void)。 子函數(shù)詳細(xì)代碼 如: void checkout() {int i,j。 for(i=301。 else {if(room[i301].flag==0) printf(Without customer.\n)。j)。 printf(\n\t\tAre you sure to check out? \n\n\t\t\tplease choose:)。 printf(The room has check out ,thanks for your wele.\n)。 入住賓館模塊