c语言课程设计-宾馆管理系统(编辑修改稿)内容摘要:

le to the hotel*************\n)。 printf(\t\t\tPlease choose a option:\n)。 printf(\t\t\t in\n\t\t\t out\n\t\t\t \n\t\t\t customer39。 s message\n\t\t\t \n)。 printf(\t\t\toption:)。 } void checkout() {int i,j。 char sure [20]。 6 printf(\n\n\t\t******Please input a name or a room number :)。 scanf(%s,sure)。 for(i=301。 i306。 i++) if(strcmp(room[i301].name[0],sure)==0||strcmp(room[i301].name[1],sure)==0||i==atoi(sure)) break。 if(i305) printf(\n\n\t\t***The room number or name is wrong!\n\n)。 else {if(room[i301].flag==0) printf(Without customer.\n)。 else if(room[i301].flag==2) {printf(\n\t\t%d %s %s %s %s\n,i,room[i301].name[0],room[i301].name[1],room[i301].sex[0],room[i301].sex[1])。 printf(\n\t\tAre you sure to check out? \n\n\t\t\tplease choose:)。 scanf(%d,amp。 j)。 if(j==1) room[i301].flag=0。 printf(The room has check out ,thanks for your wele.\n)。 } else if(room[i301].flag==1) {printf(\n\t\t%d %s %s\n,i,room[i301].name[0],room[i301].sex[0])。 printf(\n\t\tAre you sure to check out? \n\n\t\t\tplease choose:)。 scanf(%d,amp。 j)。 if(j==1) room[i301].flag=0。 printf(The room has check out ,thanks for your wele.\n)。 } } } void checkin() {int i,j,k,m,t。 t=0。 for(i=301。 i=305。 i++) if(room[i301].flag==0) break。 if(i==306) printf(\n\t\t******sorry,no vacancy******\n)。 else { printf(\n\n\t\t***please choose person person \n\t\t\t)。 scanf(%d,amp。 j)。 if(j==2) {printf(\t\tplease input name and sex(f/m):\n\t\t\t)。 scanf(%s%s%s%s,room[i301].name[0],room[i301].sex[0],room[i301].name[1],room[i301].sex[1])。 printf(\n\n\n\n\t\t\t************finish************\n\n\n)。 room[i301].flag=2。 printf( \t\tnum\t name1\t\tsex\tname2\t sex\n)。 7 printf( \t\t%d\t %s\t%s\t%s\t %s\n,i,room[i301].name[0],room[i301].sex[0],room[i301].name[1],room[i301].sex[1])。 } else if(j==1) {printf(\t\tplease input name and sex:\n\t\t\t)。 scanf(%s%s,room[i301].name[0],room[i301].sex[0])。 printf(\n\n\n\n\t\t\t************finish************\n\n\n)。 room[i301 ].flag=1。 printf( \n\n\t\t\tnum\tname\t\tsex\n)。 printf( \t\t\t%d\t%s\t%s\n,i,room[i301].name[0],room[i301].sex[0])。 } else if(j==3) {for(i=301。 i306。 i++) if(room[i301].flag==1) {printf(\t\t%d\t%s\t%s\n,i,room[i301].name[0],room[i301].sex[0])。 t++。 } if(t!=0) {printf(\t\t\tPlease choose the room number:)。 scanf(%d,amp。 k)。 if(room[k301].flag==1) {printf(\n\n\t\t\tplease input your name and sex(f/m)\n\t\t\t)。 scanf(%s%s,room[k301].name[1],room[k301].sex[1])。 printf(\t\tThe customer39。 s sex is %s .Are you sure to check in? \n\n\t\t option:,room[k301].sex[0])。 scanf(%d,amp。 m)。 if(m==1) {room[k301].flag=2。 printf(\n\n\t\t\t **********Finish**********\n)。 } } else if(room[k301].flag!=1) printf(\n\n\t\tError! the room number of inputting is not only on。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。