diff --git a/学生信息.txt b/学生信息.txt index c1ae609..dbb06cd 100644 Binary files a/学生信息.txt and b/学生信息.txt differ diff --git a/机房机位预订系统003.cpp b/机房机位预订系统(终).cpp similarity index 95% rename from 机房机位预订系统003.cpp rename to 机房机位预订系统(终).cpp index 03a1190..829487f 100644 --- a/机房机位预订系统003.cpp +++ b/机房机位预订系统(终).cpp @@ -84,7 +84,7 @@ void JIEMIAN() } void YUDING() { - int time,i,a,b,j; + int time,i,a,b,j,d; char c; FILE *fp; //ļݡ printf("8-20ʱڣԤʱ:"); @@ -113,11 +113,19 @@ void JIEMIAN() printf("\t\t ٴҪԤĻλ!(ʱͬȻܵԤʧܣ)\n"); scanf("%d",&a); getchar(); + if(jiwei[T][a-1]==0) + { x[T]--; jiwei[T][a-1]=1; printf(" Ԥɹ\n"); JIEMIAN(); - } + } + else + { + printf("\t ûλѱԤ\n"); + JIEMIAN(); + } + } else { printf("\n\t ʱûбԤĵԣ\n"); @@ -164,11 +172,19 @@ void JIEMIAN() fclose(fp); printf("ٴҪԤĻλţ\n"); scanf("%d",&b); + if(jiwei[T][b-1]==0) + { x[T]--;//һ - jiwei[T][b]=1; + jiwei[T][b-1]=1; printf("\t ϲԤɹ㽫ȴбȴϵ㡣\n"); JIEMIAN(); } + else + { + printf("\t ûλѱԤ\n"); + JIEMIAN(); + } + } else JIEMIAN(); } } diff --git a/机房机位预订系统(终).exe b/机房机位预订系统(终).exe new file mode 100644 index 0000000..f98affd Binary files /dev/null and b/机房机位预订系统(终).exe differ