成績管理數據結構課程設計
我有個Access的教務管理系統
2. 數據結構課程設計--學生成績管理系統
可以通過網路Hi告知我
有時間可以解決你的問題
相關的要求也可以告知我
ES:\\
交易提醒:預付定金是陷阱
3. 數據結構課程設計學生成績管理系統
定義結構體——可將成績等信息組成鏈表——排序就選擇合適的排序方法(數據結構書里有很多排序方法)——
4. 數據結構課程設計 學生成績查詢系統
這個是我自己寫的..我也在學習中,不足之處請諒解:#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
void newinf(void);
void showinf(void);
void insertinf(void);
void deleteinf(void);
void saveinf(void);
void infoinf(void);
void sortinf(void);
void searchinf(void);
void menu(void);
struct inf{
int number;
char name[80];
int score;
inf * prev,* next;
};
inf * head,* tail;
int high,low,average;
int total=0;
void main(void)
{ system("cls");
system("color 1a");
system("title 成績管理系統");
menu();
int choice;
scanf("%d",&choice);
system("cls");
switch(choice){
case 0:
exit(0);
break;
case 1:
newinf();
main();
break;
case 2:
searchinf();
main();
break;
case 3:
insertinf();
main();
break;
case 4:
deleteinf();
main();
break;
case 5:
sortinf();
main();
break;
case 6:
showinf();
main();
break;
case 7: //數據統計
printf("共有學生%d人\n",total);
system("pause");
main();
break;
case 8: //保存
saveinf();
main();
break;
}
}
void newinf(void)
{
inf * temp;
temp=(inf *)malloc(sizeof(inf));
printf("請輸入學號\n");
scanf("%d",&temp->number);
printf("請輸入姓名\n");
scanf("%s",&temp->name);
printf("請輸入成績\n");
scanf("%d",&temp->score);
temp->next=NULL;
if(head==NULL){
temp->prev=NULL;
head=temp;
tail=temp;
}
else{
tail->next=temp;
temp->prev=tail;
tail=temp;
}
total++;
}
void showinf(void)
{
inf * temp;
temp=head;
if(head==NULL){
printf("數據不存在\n");
system("pause");
main();
}
do{
printf("學號%d 姓名%s 成績%d\n",temp->number,temp->name,temp->score);
temp=temp->next;
}
while(temp!=NULL);
system("pause");
}
void insertinf(void)
{
if(head==NULL){
printf("數據不存在\n無法插入,請選擇 1.增加記錄\n");
system("pause");
main();
}
int input,count=0;
inf * temp,*search,*temp2;
printf("請輸入在第幾條後插入\n");
scanf("%d",&input);
while(input>total||input<=0){
printf("輸入錯誤請重新輸入");
scanf("%d",&input);
};
temp=(inf *)malloc(sizeof(inf));
printf("請輸入學號\n");
scanf("%d",&temp->number);
printf("請輸入姓名\n");
scanf("%s",&temp->name);
printf("請輸入成績\n");
scanf("%d",&temp->score);
search=head;
while(search!=NULL){
count++;
if(input==count){
temp2=search->next;
search->next=temp;
temp->prev=search;
temp->next=temp2;
if(temp2!=NULL){
temp2->prev=temp;
}
}
search=search->next;
};
total++;
}
void deleteinf(void)
{
if(head==NULL){printf("數據不存在!\n");<br> system("pause"); <br> main();}
int input,count=0;
inf * temp,*temp2,*search;
printf("請輸入刪除第幾條\n");
scanf("%d",&input);
while(input>total||input<=0){
printf("輸入錯誤請重新輸入");
scanf("%d",&input);};
search=head;
while(search!=NULL){count++;<br> if(input==count){if(count==1){head=search->next;}
temp=search->prev;
temp2=search->next;
if(temp!=NULL){
temp->next=temp2;}
if(temp2!=NULL){
temp2->prev=temp;}
free(search);}
search=search->next;};
total--;}
void searchinf(void)
{if(head==NULL){<br> printf("數據不存在!\n");<br> system("pause"); <br> main();}
inf * temp;
int choice,number,score;
char name[80];
temp=head;
printf("請選擇查找方式:\n1.按學號查找\n2.按姓名查找\n3.按成績查找\n");
scanf("%d",&choice);
printf("請輸入對應信息\n");
switch(choice){case 1:<br> scanf("%d",&number);<br> while(temp!=NULL){if(temp->number==number){printf("學號%d 姓名%s 成績%d\n",temp->number,temp->name,temp->score);}
temp=temp->next;};
break;
case 2:
getchar();
gets(name);
while(temp!=NULL){if(strcmp(temp->name,name)==0){printf("學號%d 姓名%s 成績%d\n",temp->number,temp->name,temp->score);}
temp=temp->next;};
break;
case 3:
scanf("%d",&score);
while(temp!=NULL){
if(temp->score==score){printf("學號%d 姓名%s 成績%d\n",temp->number,temp->name,temp->score);}
temp=temp->next;};
break;}
system("pause"); }
void sortinf(void)
{inf *temp,*temp2;<br> int number,score;<br> char name[80];<br> temp=head;<br> if(head==NULL){<br> printf("數據不存在\n");<br> system("pause"); <br> main();}
for(int i=1;i<=total*total;i++){
if(temp->next==NULL){temp=head;<br> continue;}
temp2=temp->next;
if(temp->number>temp2->number){
name=temp->name;
score=temp->score;
number=temp->number;
temp->name=temp2->name;
temp->score=temp2->score;
temp->number=temp2->number;
temp2->name=name;
temp2->score=score;
temp2->number=number;}
temp=temp->next;}
printf("排序完成\n");
system("pause"); }
void menu(void)
{
system("cls");
printf(" ********************************************************************\n");
printf(" * *\n");
printf(" * *\n");
printf(" * *\n");
printf(" * 成績管理系統 *\n");
printf(" * *\n");
printf(" * *\n");
printf(" * *\n");
printf(" ********************************************************************\n");
printf("1.增加記錄\n2.查找記錄\n3.插入記錄\n4.刪除記錄\n5.記錄排序\n6.查看記錄\n7.數據統計\n8.保存記錄\n0.退出\n");
}void saveinf(void)
{
printf("請注意,保存信息將覆蓋原文件!\n確認請輸入y:\n");
char a;
getchar();
scanf("%c",&a);
if(a=='y'||a=='Y')
{
FILE *file;
inf *temp;
file=fopen("save.txt","w+");
temp=head;
while(temp!=NULL)
{
fprintf(file,"學號:%d 姓名:%s 成績:%d\n",temp->number,temp->name,temp->score);
temp=temp->next;
}
printf("保存成功!");
system("pause");
main();
}
else
{
main();
}
}
5. 數據結構課程設計 學生成績管理系統 最好有注釋
http://hi..com/starvvv
6. 求 數據結構課程設計(成績分析管理系統) 一份 非常感謝各位大俠了
你給的分明顯不夠
7. 數據結構課程設計:學生成績管理系統(C++和C),求大神幫幫忙,求代碼
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
structSTUDENT{
floatscore[3];
longid;
charnames[20];
};
typedefstructSTUDENTstudent;//simplifythestructSTUDENT
typedefstructSTUDENT*Pstudent;
voidprint();
voidappend();
voidcourse_total();
voidstudent_total();
voidscore_sort(int(*compare)(floata,floatb));
voidnumber_sort();
voidname_sort(Pstudentnames_[30]);
voidnumber_search();
voidname_search();
voidstatistic(Pstudentscores_[30]);
voidshow(inti);
intascend(floata,floatb){
if(a>b)return1;
elsereturn0;
}
intdescend(floata,floatb){
if(a<b)return1;
elsereturn0;
}
intn;//thenumberofstudents
intflg=1;//trueprinttheresult
student*stuArray[30];//
intagain=1;//whethertocontinue
intmain(){
inti;
printf("Inputstudentnumber(n<30):");
scanf("%d",&n);
intchoice;
while(again){
print();
scanf("%d",&choice);
switch(choice){
case1:
append();
break;
case2:
course_total();//useflagtodefinewhethertoprint
break;
case3:
student_total();
break;
case4:
score_sort(descend);
if(flg){
printf(": ");
printf("NO Name MT EN PH SUM AVER ");
for(i=0;i<n;i++)
show(i);
}
break;
case5:
score_sort(descend);
if(flg){
printf(": ");
printf("NO Name MT EN PH SUM AVER ");
for(i=0;i<n;i++)
show(n-1-i);
}
break;
case6:
number_sort();
break;
case7:
name_sort(stuArray);
break;
case8:
number_search();
break;
case9:
name_search();
break;
case10:
statistic(stuArray);
break;
case0:
again=0;
printf("Endofprogram! ");
break;
default:
printf("Inputerror! ");
break;
}
}
return0;
}
voidprint(){
printf("1.Appendrecord ");
printf("2. ");
printf("3. ");
printf("4. ");
printf("5. ");
printf("6.Sortinascendingorderbynumber ");
printf("7.Sortindictionaryorderbyname ");
printf("8.Searchbynumber ");
printf("9.Searchbyname ");
printf("10.Statisticanalysis ");
printf("PleaseInputyourchoice:");
}
voidappend(){
inti;
printf("Inputstudent'sID,nameandscore: ");
for(i=0;i<n;i++){////
stuArray[i]=(student*)malloc(sizeof(student));
scanf("%ld%s",&stuArray[i]->id,stuArray[i]->names);
scanf("%f",&stuArray[i]->score[0]);
scanf("%f",&stuArray[i]->score[1]);
scanf("%f",&stuArray[i]->score[2]);
}
}
voidcourse_total(){
inti;
floatsum0=0.0,sum1=0.0,sum2=0.0;
for(i=0;i<n;i++){
sum0+=stuArray[i]->score[0];
sum1+=stuArray[i]->score[1];
sum2+=stuArray[i]->score[2];
}
if(flg){
printf("course%d:sum=%.0f,aver=%.0f ",1,sum0,sum0/n);
printf("course%d:sum=%.0f,aver=%.0f ",2,sum1,sum1/n);
printf("course%d:sum=%.0f,aver=%.0f ",3,sum2,sum2/n);
}
}
voidstudent_total(){
floattotal[30]={0.0};
inti;
for(i=0;i<n;i++){
total[i]=stuArray[i]->score[0]+stuArray[i]->score[1]+stuArray[i]->score[2];
}
if(flg){
for(i=0;i<n;i++)
printf("student%d:sum=%.0f,aver=%.0f ",i+1,total[i],total[i]/3);
}
}
voidscore_sort(int(*compare)(floata,floatb)){
inti,j;
floattotal[30]={0.0};
for(i=0;i<n;i++){
total[i]=stuArray[i]->score[0]+stuArray[i]->score[1]+stuArray[i]->score[2];
}
for(i=0;i<n;i++){
for(j=0;j<=i;j++)
//if((*compare)(stuArray[i]->score[0]+stuArray[i]->score[1]+stuArray[i]->score[2],stuArray[j]->score[0]+stuArray[j]->score[1]+stuArray[j]->score[2])==0){
if((*compare)(total[i],total[j])==0){//
student*tmp=(student*)malloc(sizeof(student));
memcpy(tmp,stuArray[i],sizeof(student));
memcpy(stuArray[i],stuArray[j],sizeof(student));
memcpy(stuArray[j],tmp,sizeof(student));
}//memcpy->theholethememory
}
}
voidnumber_sort(){//沒必要傳參
inti,j;
for(i=0;i<n;i++){
for(j=0;j<i;j++)
if(stuArray[i]->id<stuArray[j]->id){
student*tmp=(student*)malloc(sizeof(student));
memcpy(tmp,stuArray[i],sizeof(student));
memcpy(stuArray[i],stuArray[j],sizeof(student));
memcpy(stuArray[j],tmp,sizeof(student));
}
}
if(flg){
printf("Sortinascendingorderbynumber: ");
printf("NO Name MT EN PH SUM AVER ");
for(i=0;i<n;i++)
show(i);
}
}
voidname_sort(Pstudentnames_[30]){
inti,j;
for(i=0;i<n;i++){
for(j=0;j<=i;j++)
if(strcmp(names_[i]->names,names_[j]->names)<0){
student*tmp=(student*)malloc(sizeof(student));
memcpy(tmp,stuArray[i],sizeof(student));
memcpy(stuArray[i],stuArray[j],sizeof(student));
memcpy(stuArray[j],tmp,sizeof(student));
}
}
if(flg){
printf("Sortindictionaryorderbyname: ");
printf("NO Name MT EN PH SUM AVER ");
for(i=0;i<n;i++)
show(i);
}
}
voidnumber_search(){
longquery;
printf("Inputthenumberyouwanttosearch:");
scanf("%ld",&query);
inti;
score_sort(descend);//1009887
for(i=0;i<n;i++){
if(stuArray[i]->id==query)
break;
}
if(i!=n){
printf("%d ",i+1);
show(i);
}
else
printf("Notfound! ");
}
voidname_search(){
charquery[20];
score_sort(descend);
printf("Inputthenameyouwanttosearch:");
scanf("%s",query);
inti;
for(i=0;i<n;i++){
if(!strcmp(query,stuArray[i]->names)){
break;
}
}
if(i!=n){
printf("%d ",i+1);
show(i);
}
else
printf("Notfound! ");
}
voidstatistic(Pstudentscores_[30]){//apointerarraystandsforscores
floatMT[30],EN[30],PH[30];
inti;
for(i=0;i<n;i++){
MT[i]=scores_[i]->score[0];
EN[i]=scores_[i]->score[1];
PH[i]=scores_[i]->score[2];
}
intsta[6]={0};//(<60or60-70....)
for(i=0;i<n;i++){
if(MT[i]<60)
sta[0]++;
if(MT[i]==100)
sta[5]++;
if(MT[i]>=60&&MT[i]<=69)
sta[1]++;
if(MT[i]>=70&&MT[i]<=79)
sta[2]++;
if(MT[i]>=80&&MT[i]<=89)
sta[3]++;
if(MT[i]>=90&&MT[i]<=100)
sta[4]++;
}
if(flg){
printf("Forcourse%d: ",1);
printf("<60 %d %.2f%% ",sta[0],sta[0]/(float)n*100);//changentofloat
printf("60-69 %d %.2f%% ",sta[1],sta[1]/(float)n*100);
printf("70-79 %d %.2f%% ",sta[2],sta[2]/(float)n*100);
printf("80-89 %d %.2f%% ",sta[3],sta[3]/(float)n*100);
printf("90-100 %d %.2f%% ",sta[4],sta[4]/(float)n*100);
printf("100 %d %.2f%% ",sta[5],sta[5]/(float)n*100);
}
memset(sta,0,6*sizeof(int));//initializethestaarray
for(i=0;i<n;i++){
if(EN[i]<60)
sta[0]++;
if(EN[i]==100)
sta[5]++;
if(EN[i]>=60&&EN[i]<=69)
sta[1]++;
if(EN[i]>=70&&EN[i]<=79)
sta[2]++;
if(EN[i]>=80&&EN[i]<=89)
sta[3]++;
if(EN[i]>=90&&EN[i]<=100)
sta[4]++;
}
if(flg){
printf("Forcourse%d: ",2);
printf("<60 %d %.2f%% ",sta[0],sta[0]/(float)n*100);//changentofloat
printf("60-69 %d %.2f%% ",sta[1],sta[1]/(float)n*100);
printf("70-79 %d %.2f%% ",sta[2],sta[2]/(float)n*100);
printf("80-89 %d %.2f%% ",sta[3],sta[3]/(float)n*100);
printf("90-100 %d %.2f%% ",sta[4],sta[4]/(float)n*100);
printf("100 %d %.2f%% ",sta[5],sta[5]/(float)n*100);
}
memset(sta,0,6*sizeof(int));
for(i=0;i<n;i++){
if(PH[i]<60)
sta[0]++;
if(PH[i]==100)
sta[5]++;
if(PH[i]>=60&&PH[i]<=69)
sta[1]++;
if(PH[i]>=70&&PH[i]<=79)
sta[2]++;
if(PH[i]>=80&&PH[i]<=89)
sta[3]++;
if(PH[i]>=90&&PH[i]<=100)
sta[4]++;
}
if(flg){
printf("Forcourse%d: ",3);
printf("<60 %d %.2f%% ",sta[0],sta[0]/(float)n*100);//changentofloat
printf("60-69 %d %.2f%% ",sta[1],sta[1]/(float)n*100);
printf("70-79 %d %.2f%% ",sta[2],sta[2]/(float)n*100);
printf("80-89 %d %.2f%% ",sta[3],sta[3]/(float)n*100);
printf("90-100 %d %.2f%% ",sta[4],sta[4]/(float)n*100);
printf("100 %d %.2f%% ",sta[5],sta[5]/(float)n*100);
}
}
voidshow(inti){
printf("%ld %s ",stuArray[i]->id,stuArray[i]->names);//orderistheidaftersort
printf("%.0f %.0f %.0f ",stuArray[i]->score[0],stuArray[i]->score[1],stuArray[i]->score[2]);
floatsum=stuArray[i]->score[0]+stuArray[i]->score[1]+stuArray[i]->score[2];
printf("%.0f %.0f ",sum,sum/3);
}
8. 學生成績管理 (數據結構——課程設計)
我有個用c寫的!功能和你的基本一樣!你看看我這的合你要求再聯系我!
程序功能如下:
1.打開文件:從指定文件讀入原始數據。
2.輸入記錄:輸入學號,如果該學號的記錄不存在,則把數據添加到結構數組中。平均分不輸入,由程序算出。要求輸入時確保數據類型正確。若該學號不存在,則顯示提示信息。學生人數由用戶自定。
3.修改功能:輸入學號,若該學號存在,則顯示並允許修改除學號以外的其餘數據,顯示修改後的數據,若有錯可以再進行修改。若該學號不存在,則顯示提示信息。
4.簡單查詢功能:能按學號或姓名查詢,顯示查詢到的記錄,如果不存在,則輸出提示信息。
5.統計查詢功能:
1)三科成績均大於85分的記錄
2)有不及格課程的記錄
3)平均分在指定范圍的記錄
4)平均分在各分數段的人數和比例(60分以上10分為一個分數段,60分以下為一個分數段)
5)有大於100分的課程的記錄
6.顯示記錄:按記錄輸入順序或平均分(降序)顯示全部記錄。
7.保存數據到文件:將結構數組中的數據保存到指定文件中。
8.主控程序的功能:反復顯示包含各功能選擇項的菜單,等待用戶選擇,直到用戶選擇退出。
9. 宿遷學院數據結構課程設計—學生成績管理系統
樓上是三系的吧,明天來葛院長辦公室