學生資訊管理系統設計
學生資訊包括:學號,姓名,年齡,性別,出生年月,位址,**,e-mail等。
試設計一學生資訊管理系統,使之能提供以下功能:
系統以選單方式工作
學生資訊錄入功能(學生資訊用檔案儲存)—輸入
學生資訊瀏覽功能—輸出
查詢、排序功能—演算法
按學號查詢
按姓名查詢學生資訊的刪除與修改
c語言課程設計的作業,懵懵懂懂的做了乙個,很多**其實都是一樣的,上下可以互相貼
#include//標準的輸入輸出函式標頭檔案
#include//字串類標頭檔案
#include//數學函式標頭檔案
#includechar f;
file *fp;//檔案指標
#define m 80
struct student //結構體定義宣告
;void input(struct student stu[m]);//輸入函式
void output(struct student stu[m]);//輸出函式
void lookfor(struct student stu[m]);//查詢函式
void order(struct student stu[m]);//排序函式
void delete_s(struct student stu[m]);//刪除函式
void modify(struct student stu[m]);//修改函式
void xuehao(struct student stu[m]);//學號查詢函式
void xingming(struct student stu[m]);//姓名查詢函式
void fileread(struct student stu[m]);//讀取檔案資訊函式
void filewrite(struct student stu[m]);//寫入檔案函式
int count;//定義乙個全域性變數
struct student t;
int main()
} switch (choice) //根據選擇,呼叫不同的函式來完成不同的任務
}while(choice!=9);
printf("the program is over!\n");
return 0;
}void input(struct student stu[m])//自定義輸入函式
void output(struct student stu[m])//自定義輸出函式
else
};break;
case 2:for(j=0;jstu[max].yy)
//整個為排序部分,採用了選擇排序的方法
};break;
case 3:for(j=0;jstu[max].wl)
};break;
case 4:for(j=0;jstu[max].cyy)
};break;
case 5:for(j=0;jstu[max].pe)
};break; //強制型別轉換符號只能用於有運算元,根據賦值運算中的型別轉換問題可知
default:printf("無效的選擇!請重新輸入!\n");break; }}
void delete_s(struct student stu[m])//自定義刪除函式(按學號刪除)
else
index++;
} if(j==count)
printf("抱歉!!!沒有你所需要刪除的學生資訊!*_*!\n"); }}
void modify(struct student stu[m])//自定義修改函式
else
printf("選擇資訊: 1、學號 2、姓名 3、年齡 4、性別 5、出生年月 6、位址 7、** 8、e-mail\n");
scanf("%d",&course);
switch(course)
}} return;
}void filewrite(struct student stu[m])//自定義寫入檔案函式
if (f=='y')
for(j=0;jfclose(fp);
if(count==0)
printf("沒有檔案,無法儲存\n");
else
printf("資料儲存完畢\n");
system("pause");
} else
return;
}void fileread(struct student stu[m])//自定義讀取檔案資訊函式
fread(&stu[j],sizeof(struct student),1,fp);
count=0;
count++;
j++;
while(fread(&stu[j],sizeof(struct student),1,fp))
fclose(fp);
printf("資料讀取完畢!\n");
system("pause");
} else
return;
}
學生資訊管理系統 設計實現
俗話說 不謀萬世者,不足謀一時 不謀全域性者,不足謀一域 不能長遠地考慮問題的人,眼前的問題他也看不到 不能全面地把握局勢的人,在細節上他也處理不好。所以在具體的實現之前,我們必須要將 全域性 做好,也就是對系統的把控。知道系統是什麼?做什麼?大概怎麼做?首先對系統的大體框架進行劃分 可以看出分為 ...
學生資訊管理系統
學生資訊管理系統,顧名思義就是為了管理學生的相關資訊做的一款軟體。雖然這次有原始碼供我們參考,但是從中我學習到了如何從開始到完工去做一款軟體,下邊我從做一項軟體專案的前後順序來總結我的學生資訊管理系統。一,分析需求 首先在做這款軟體是,我們先想象乙個成品,他的功能有哪些,每個功能完成哪項任務,這就是...
學生資訊管理系統
1.背景描述 學校招生辦在錄取當年新生時為新生建立了乙個新生基礎資訊類studentbase,其中包含每位新生的基本資料 學號 long mnum 姓名 char mname 20 性別 int m 其中0表示男,1表示女 年齡 int mage 住址 char maddr 30 新生主修專業所在系...