diff --git a/课程设计.cpp b/课程设计.cpp index 0ed5dfd..948d63b 100644 --- a/课程设计.cpp +++ b/课程设计.cpp @@ -39,6 +39,9 @@ struct xmform1{ char mc4[10]; char mc5[10]; }; + + + struct xmform2{ char name[20]; char mc1[10]; @@ -46,6 +49,7 @@ struct xmform2{ char mc3[10]; }; + struct schoolform{ char name[20]; char id[10]; @@ -53,6 +57,7 @@ struct schoolform{ int scoer=0; }; + struct studentform{ char name[20]; char xb[10]; @@ -66,6 +71,8 @@ struct studentform{ } xm; int allscoer; }; + + int ggy(struct studentform student[]){ printf("ÇëÊäÈë²Î¼Ó±ÈÈüµÄÑ¡ÊÖ¸öÊý\n"); int n; @@ -112,6 +119,7 @@ struct studentform{ fprintf(fp,"%10s%5s%10s%5d%10s%10s",student[i].name,student[i].xb,student[i].number,student[i].age,student[i].name1,student[i].xm.name); } printf("´æ´¢Íê³É\n"); + fclose(fp); printf("¿ªÊ¼´´Ôì´ò¿ªÃܳ×\n"); if((fp=fopen("studentrs","wb+"))==NULL){ printf("´ò¿ªÃܳ״´Ôìδ³É¹¦\n"); @@ -121,9 +129,12 @@ struct studentform{ } fprintf(fp,"%5d",n); fclose(fp); - printf("********************\n"); + printf("********************\n");} return n; - }} + } + + + int ggy1(struct schoolform school[]){ printf("ÇëÊäÈë²Î¼Ó±ÈÈüµÄѧУ¸öÊý\n"); int n; @@ -179,6 +190,8 @@ struct studentform{ } return n; } + + int ggy2(struct xmform1 xm1[],struct studentform student[],struct schoolform school[],int schoolgs,int studentrs){ printf("ÇëÊäÈëÕâÒ»ÀàÏîÄ¿µÄ¸öÊý£º\n"); @@ -190,7 +203,7 @@ struct studentform{ for(i=0;i