From 62ae39ed1e4fc2d3e5345bc86f84cdcafd2043de Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 10 Jan 2019 08:36:16 +0800 Subject: [PATCH] first commit --- 机房(1)(1).c | 237 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 机房(1)(1).c diff --git a/机房(1)(1).c b/机房(1)(1).c new file mode 100644 index 0000000..fcb52d2 --- /dev/null +++ b/机房(1)(1).c @@ -0,0 +1,237 @@ + #include + #include + #include + void insert();//¼ÈëѧÉúÐÅÏ¢ + void findCLASS();//°´°à¼¶²éѯ + void findNO();//°´Ñ§ºÅ²éѯ// + void findNAME();//°´ÐÕÃû²éѯ + void money();//½áÕË + void addstu();//Ìí¼ÓѧÉú + void addfile(); //Ìí¼Óµ½Îļþ + struct time//ʱ¼ä½á¹¹Ìå + { + int hour; + int min; + }; + struct STUDENT//ѧÉú½á¹¹Ìå + { + + char NO[20]; + char CLASS[20]; + char NAME[20]; + int time_hour; + int time_min; + struct time begin,end;//ǶÌ×¶¨ÒåѧÉú½á¹¹Ìå + }; + struct STUDENT stu[30]; + static int i=0; + + int main()//Ö÷º¯Êý + { + int i; + for(;;) + { //Ö÷½çÃæ + printf("\t\t\t*********************\n"); + printf("\t\t\t ²Ëµ¥ \n"); + printf("\t\t\t1 ´´½¨Ñ§ÉúÐÅÏ¢\n"); + printf("\t\t\t2 °´Ñ§ºÅ²éÕÒѧÉúÐÅÏ¢\n"); + printf("\t\t\t3 °´°à¼¶²éÕÒѧÉú\n"); + printf("\t\t\t4 °´ÐÕÃû²éÕÒѧÉú\n"); + printf("\t\t\t5 ÉÏ»ú·ÑÓÃ\n"); + printf("\t\t\t6 Ìí¼ÓѧÉúÐÅÏ¢\n"); + printf("\t\t\t7 Ìí¼ÓѧÉúÐÅÏ¢µ½Îļþ\n"); + printf("\t\t\t8 ¹Ø±Õϵͳ"); + printf("\n\n\n\t\t\tÊäÈëÏàÓ¦ÐòºÅ½øÐвÙ×÷\n\n\t\t\t"); + scanf("%d",&i); + switch(i)//Ñ¡Ôñ·ÖÖ§½á¹¹ + { + case 1: + { + system("cls"); + insert(); + + }break; + case 2: + { + system("cls"); + findNO(); + }break; + case 3: + { + system("cls"); + findCLASS(); + } break; + case 4: + { + system("cls"); + findNAME(); + }break; + case 5: + { + system("cls"); + money(); + }break; + case 6: + { + system("cls"); + addstu(); + }break; + + case 7: + { + system("cls"); + addfile(); + }break; + case 8: + { + return 0; + } + + + + } + } + system("pause") ; + return 0; + } + void insert()//¼Èë + { + printf("ÇëÊäÈëѧÉúѧºÅ:\n"); + scanf("%s",&stu[i].NO); + printf("ÇëÊäÈëѧÉú°à¼¶:\n"); + scanf("%s",&stu[i].CLASS); + printf("ÇëÊäÈëѧÉúÐÕÃû:\n"); + scanf("%s",&stu[i].NAME); + printf("ÇëÊäÈëÆðʼʱ¼ä:\n"); + scanf("%d:%d",&stu[i].begin.hour,&stu[i].begin.min); + i=i+1; + system("pause"); + system("cls"); + } + void findNO()//ѧºÅ²éÕÒ + { + int m; + char no[100]; + printf("ÊäÈëѧºÅ:"); + scanf("%s",&no); + for(m=0;m