diff --git a/考试系统.c b/考试系统.c new file mode 100644 index 0000000..3501f52 --- /dev/null +++ b/考试系统.c @@ -0,0 +1,284 @@ +#include +#include + + +typedef struct student{ + char name[25]; + int num; + int t; + int f; + float total; +}STU; +typedef struct textpaper{ + char title[1000]; + char a[100]; + char b[100]; + char c[100]; + char d[100]; + char answer; +}Paper; +void Openfile();//´ò¿ªÎļþ +float pinfen(char,char);//ÆÀ·Ö +void chengji(); //°´Õճɼ¨ÌݶÈÊä³ö³É¼¨ +void design();//³öÌâϵͳ +void check();//²é¿´Ìâ¿â +void del();//ɾ³ýÌâÄ¿ +void alter();//ÐÞ¸ÄÌâÄ¿ +int a=0,d=0,t=0;//a±íʾÈËÊý t³õʼ»¯ÌâÄ¿¸öÊý <-È«¾Ö±äÁ¿ +struct student stu[100]; +Paper problem[1000]; +int main(){ + char ch,ch1,key;//key±íʾѧÉúÊäÈëµÄ´ð°¸ + float sum=0,count=0; + int b,c; + Openfile();//´ò¿ªÌâ¿â + printf("================================================================================\n\n"); + printf("================================================================================\n\n"); + printf("*************************»¶Ó­Ê¹Óÿ¼ÊÔϵͳ*******************************\n\n"); + printf("--------------------------------------------------------------------------------\n\n"); + printf("********************************************************************************\n\n"); + printf("================================================================================\n\n"); + printf("Çë°´ÈÎÒâ¼ü½øÈ뿼ÊÔϵͳϵͳ£º\n"); + getchar(); + system("cls"); + printf("ÊÇ·ñ½øÈ뿼ÊÔ: y/n yΪÊÇ£»nΪ²»ÊÇ\n"); + scanf("%c",&ch1); + getchar(); + if(ch1=='y'||ch1=='Y'){ + printf("--------------------------ÏȼÈëѧÉúÐÅÏ¢-----------------------------\n"); + printf("--------------------ÊÇ·ñÑ¡Ôñ¼Èë¶àÈË Y/N --------\n"); + printf("--------------------ÇëÊäÈë-------\n"); + scanf("%c",&ch); + getchar(); + + if(ch=='y'||ch=='Y'){ + printf("ÇëÊäÈëÄúÐèҪ¼ÈëµÄÈËÊý\n"); + scanf("%d",&a); + for(int i=0;i