diff --git a/学生成绩管理系统.cpp b/学生成绩管理系统新.cpp similarity index 81% rename from 学生成绩管理系统.cpp rename to 学生成绩管理系统新.cpp index 883976a..5de5c99 100644 --- a/学生成绩管理系统.cpp +++ b/学生成绩管理系统新.cpp @@ -15,9 +15,9 @@ struct node // node *next;//ָ }; -node *create()//ѧϢ +node *create()//ѧɼϢ { - struct node * head,* p,* q; //*pָͷ*qָβ + struct node * head,* p,* q; //*headһͷ*qָͷ*pָβ int number; char sname[15]; int sgs,syy,sc; @@ -49,7 +49,7 @@ node *create()// if(number==0) { break;//0Ϣ - } + } scanf("%s",&sname);// scanf("%d",&sgs);//ɼ scanf("%d",&syy);//Ӣɼ @@ -59,9 +59,9 @@ node *create()// q->yy=syy;//ֵ q->c=sc;//ֵ strcpy(q->name,sname);//ֵ - q->next=NULL;//qָ¸ṹβָΪ - p->next=q; // - p=q; + q->next=NULL; //qָָ´Ľڵ + p->next=q; // pָǰһڵ㣬ڵnextǿ + p=q; //pʼָβڵ } return head;//ͷ @@ -69,7 +69,7 @@ node *create()// } -node *jiaru(node *head)//ѧϢ +node *jiaru(node *head)//ѧɼϢ { node *p,* q; int number; @@ -107,52 +107,7 @@ node *jiaru(node *head)// } -node * delete_name(node *head)//ɾѧϢ -{ - node *b,*p; - p=head; - char qname[15]; - char c; - printf("Ҫɾѧ:"); - scanf("%s",&qname);//Ҫɾѧ - while(1) - { - if(p==NULL) - { - return head;//ϢΪ򷵻ԭͷ - } - if(strcmp(p->name,qname)==0) - { - printf("ȷɾy/n:"); - scanf("%s",&c); - if(c=='y') - { - if(p==head)//жͷָ - { - head=p->next; - free(p);//ͷڴռ - printf("ɾɹ\n"); - return head;//ͷ - } - else - { - b->next=p->next;//ʹpǰ - free(p);//ͷڴռ - printf("ɾɹ\n"); - return head;//ͷ - } - } - else - printf("˳ɾ\n"); - } - b=p; - p=p->next;//һ - } - printf("ɾ\n"); - return head;//ͷ -} - -node * delete_i(node *head)//ѧɾѧϢ +node * delete_i(node *head)//ѧɾѧɼϢ { node *b,*p; p=head; @@ -198,7 +153,7 @@ node * delete_i(node *head)// } -int query_name(node * head)//ѧϢ +int query_name(node * head)//ѧɼϢ { struct node * p; char sname[20]; @@ -220,7 +175,7 @@ int query_name(node * head)// return 0; } -int query_i(node * head)//ѧŲѧϢ +int query_i(node * head)//ѧŲѧɼϢ { struct node * p; int i; @@ -243,6 +198,8 @@ int query_i(node * head)// printf("ûҵ\n"); return 0; } + + int install_name(node * head)//ѧϢijѧ֮ { struct node *p,*n; @@ -316,7 +273,7 @@ int install_i(node * head)// return 0; } -int xiugai_name(node *head)//ͨ޸ѧϢ +int xiugai_name(node *head)//ͨ޸ѧɼϢ { node *p; p=head; @@ -353,7 +310,7 @@ int xiugai_name(node *head)//ͨ } } -int xiugai_i(node *head)//ͨѧ޸ѧϢ +int xiugai_i(node *head)//ͨѧ޸ѧɼϢ { node *p; p=head; @@ -390,7 +347,7 @@ int xiugai_i(node *head)//ͨ } } -void printf(node * head)//Ϣ +void printf(node * head)//гɼϢ { FILE *fp; char buf[BUFSIZE]; @@ -432,30 +389,28 @@ int main()// printf("*********************************************\n"); while(1) { - printf(" * 1.Ϣ *\n"); + printf(" * 1.ѧɼϢ(ֻʹһ) *\n"); printf(" * *\n"); - printf(" * 2.ѧϢ *\n"); - printf(" * *\n"); - printf(" * 3.ѧϢ *\n"); + printf(" * 2.ѧɼϢ *\n"); printf(" * *\n"); - printf(" * 4.ѧŲѧϢ *\n"); + printf(" * 3.ѧɼϢ *\n"); printf(" * *\n"); - printf(" * 5.ɾѧϢ *\n"); + printf(" * 4.ѧŲѧɼϢ *\n"); printf(" * *\n"); - printf(" * 6.ѧɾѧϢ *\n"); + printf(" * 5.ѧɾѧɼϢ *\n"); printf(" * *\n"); - printf(" * 7.޸ѧϢ *\n"); + printf(" * 6.޸ѧɼϢ *\n"); printf(" * *\n"); - printf(" * 8.ѧ޸ѧϢ *\n"); + printf(" * 7.ѧ޸ѧɼϢ *\n"); printf(" * *\n"); - printf(" * 9.ѧϢijѧ֮ *\n"); + printf(" * 8.ѧɼϢijѧ֮ *\n"); printf(" * *\n"); - printf(" * 10.ѧϢڼλѧ֮ *\n"); + printf(" * 9.ѧɼϢڼλѧ֮ *\n"); printf(" * *\n"); - printf(" * 11.ѧϢ *\n"); + printf(" * 10.ѧɼϢ *\n"); printf(" * *\n"); - printf(" * 0.˳ *\n\n"); - printf("ѡ:"); + printf(" * 0.˳ *\n\n"); + printf("ѡ:"); scanf("%d",&n); //жϲ if(n==1) head=create(); @@ -466,18 +421,16 @@ int main()// if(n==4) query_i(head); if(n==5) - head=delete_name(head); - if(n==6) head=delete_i(head); - if(n==7) + if(n==6) xiugai_name(head); - if(n==8) + if(n==7) xiugai_i(head); - if(n==9) + if(n==8) install_name(head); - if(n==10) + if(n==9) install_i(head); - if(n==11) + if(n==10) printf(head); if(n==0) { diff --git a/学生成绩管理系统.exe b/学生成绩管理系统新.exe similarity index 63% rename from 学生成绩管理系统.exe rename to 学生成绩管理系统新.exe index e46f952..5495b9a 100644 Binary files a/学生成绩管理系统.exe and b/学生成绩管理系统新.exe differ diff --git a/计算机学院 面向过程程序设计(C语言) 课程设计(实训)报告.doc b/计算机学院 面向过程程序设计(C语言) 课程设计(实训)报告.doc new file mode 100644 index 0000000..b7f1ee9 Binary files /dev/null and b/计算机学院 面向过程程序设计(C语言) 课程设计(实训)报告.doc differ