From 146cfbdd1632f9299b5d41a9a14727be7fba1879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E5=BD=A6=E5=B3=B0=E2=80=9Cgit=20config=20--globa?= =?UTF-8?q?l=20user=2Ename=20=E8=82=96=E5=BD=A6=E5=B3=B0=E2=80=9C?= <1073379279@qq.com> Date: Fri, 11 Jan 2019 21:36:30 +0800 Subject: [PATCH] 4 commit --- 查询房间入住情况.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 查询房间入住情况.c diff --git a/查询房间入住情况.c b/查询房间入住情况.c new file mode 100644 index 0000000..cd937ea --- /dev/null +++ b/查询房间入住情况.c @@ -0,0 +1,33 @@ +void availability() //ѯס +{ + int g,count=0; + for(g=0;g<100;g++) +{ + if(z[g]==0) + ++count; + else + if(z[g]==1) + printf("\nʹõķ:%d",g); +} + printf("\n\nδʹõķ:%d",count); //ͨѭδʹõķ + printf("\n\n"); + printf("\nѯķ: "); //ѯķŵϢ÷Ϣ + scanf("%d",&s); + while(s<0||s>100) + {printf(" *********************롣********************\n"); + scanf("%d",&s);}if(s==0) menu(); + if(z[s]==1) + {printf(":%s",room[s].name); + printf("\nԱ(У1ʾУ2ʾŮ):%d",room[s].sex); + printf("\n:%d",room[s].age); + printf("\n֤:%s",room[s].ID_card); + printf("\n:%d",room[s].date.year); + printf(" :%d",room[s].date.month); + printf(" :%d",room[s].date.day); + printf("\n:%d",room[s].room_ID); + } + else + printf("÷δʹ!"); + menu(); + save(); //ñ溯 +}