freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

學(xué)生和教師信息管理系統(tǒng)c語言課程設(shè)計(jì)-wenkub

2023-05-24 22:10:42 本頁面
 

【正文】 據(jù) 提示該教師號(hào)不存在,重新輸入 退出 exit 18 6,修改函數(shù) scanf(%d,amp。 0 1 2 返回菜單 翻下頁 翻上頁 退出 17 4,查詢函數(shù) scanf(%ld,amp。 fclose(fp)。為退出 \n)。l)。 ? 保存功能:可用 save(struct teacher *L)函數(shù)來實(shí)現(xiàn)。 6 ? 刪除功能:可用 teacher* Delete(struct teacher *L)函數(shù)來實(shí)現(xiàn)。 ? 瀏覽功能:可用 output(struct teacher *L) 函數(shù)來實(shí)現(xiàn)。 ( 3)顯示數(shù)據(jù)時(shí),一頁顯示不下,可分頁顯示 。并能根據(jù)菜單調(diào)用相應(yīng) 5 的函數(shù)功能。 8. 從 文件中讀取第 1, 3, 5, 7, 9個(gè)學(xué)生的數(shù)據(jù)。刪除指定學(xué)號(hào)的學(xué)生數(shù)據(jù),對(duì)學(xué)生數(shù)據(jù)進(jìn)行排序,分別在鏈表頭部,中間,末尾插入學(xué)生數(shù)據(jù)。 ( a: ascending 升, d:descending 降) 4. 編寫 4個(gè)排序函數(shù),實(shí)現(xiàn) 4種不同的排序算法(用冒泡法進(jìn)行升序排序,用冒泡法進(jìn)行降序排序,選擇法進(jìn)行升序排序,選擇法進(jìn)行降序排序等),函數(shù)返回指向排好序的數(shù)組的指針。 d 39。 5. 將排好序的成績單進(jìn)行反序存放,即原來是從高到低,現(xiàn)在改為從低到高排列。 步驟、方法與要求 1. 定義一個(gè)數(shù)組 a[11],用以存放學(xué)生的成績。 2. 從鍵盤輸入 10個(gè)學(xué)生成績。 6. 將以上每一步驟的結(jié)果均打印輸出,驗(yàn)證程序是否正確實(shí)現(xiàn)題目要求。 按降序排。 5. 編寫通用輸出函數(shù) show( int( * fun) (int,int), int a[ ], int n ),其中 a[]為成績數(shù)組, n為數(shù)組元素個(gè)數(shù)。 (四) 學(xué)生成績文件管理 定義一個(gè)結(jié)構(gòu)體數(shù)組,存放 10 個(gè)學(xué)生的學(xué)號(hào),姓名,三門課的成績,輸出單門課成績最高的學(xué)生的學(xué)號(hào)、姓名、以及該門課程的成績,輸出三門課程的平均分?jǐn)?shù)最高的學(xué)生的學(xué)號(hào)、姓名及其平均分,將 10 個(gè)學(xué)生的相關(guān)數(shù)據(jù),存入文件中,再從文件中讀出,按照平均分?jǐn)?shù)從高到低進(jìn)行排序,分別將結(jié)果輸出到屏幕上和另 一文件中,再從文件中讀取第 1 , 3 , 5 , 7, 9個(gè)學(xué)生的數(shù)據(jù)。 (五)教師信息管理系統(tǒng)設(shè)計(jì) 教師信息包括教師號(hào)、姓名、性別、年齡、學(xué)歷、職稱、工資、住址、電話等(教師號(hào)不重復(fù))。 口令程序段的功能要求: 《 1》提示用戶輸入一個(gè)口令。 二: 總體設(shè)計(jì) (一)、仔細(xì)閱讀系統(tǒng)要求,首先將此系統(tǒng)化分為如下模塊 /功能(即如下函數(shù)) ? 錄入功能:可用函數(shù) teacher *insert(struct teacher *head,struct teacher *teach) 。找到就輸出此教師全部信息包括教師號(hào)、姓名、性別、年齡、學(xué)歷、職稱、工資、住址、電話等信息。其中通過教師號(hào)查詢刪除所選擇的信息。 ? 加載功能:可用 *load() 函數(shù)來實(shí)現(xiàn) 。輸入選擇所需的項(xiàng),進(jìn)入相應(yīng)的菜單 選項(xiàng) 1 2 2 初始化信息 退出 2,錄入函數(shù) scanf(%d,amp。 scanfdata(p1)。退出 繼續(xù)輸入 3,瀏覽函數(shù) 通過直接調(diào)用通用輸出函數(shù) void output(struct teacher *head)瀏覽一輸入存儲(chǔ)的數(shù)據(jù) if((Lnext)!=NULL) if((Lnext)!=NULL) if((Lnext)!=NULL) if((Lnext)!=NULL) if((Lnext)!=NULL) yes no 分 6 個(gè)為一頁輸出數(shù)據(jù) printf(沒記錄 \n)。num); 輸入要查詢的教師號(hào) 判斷是否存在該教師號(hào) 存在 不存在 輸出該教師的全部信息 printf(查詢失敗 \n)。l); 選擇修改函數(shù) printf(請輸入要修改的教師號(hào) :\n)。 scanfdata(p1)。通過 fp=fopen(,a)。 int i,j。 for(i=0。 i=0。 printf(\n)。 i=0。p++。a[10])。 p=a。p++。 cong(p,11)。i++) {printf(%f,*p)。 } void sort(float a[],int n) {int i,j,k。i++) {k=i。 if(k!=i) {t=a[i]。 float t。a[i]=a[j]。i9。j++) if(x[j]x[k])k=j。} } return x。i++) {k=i。 if(k!=i) {t=x[i]。 } int*sort2(int x[],int n, char style) /*改進(jìn)程序二 */ { int i,j,k,t。) { for(i=0。j10。x[k]=t。 return x。j++) for(i=0。x[i+1]=t。jn1。x[i]=x[i+1]。 for(i=0。 } void show(int*(*fun)(int*,int),int* x,int n) { int i。++i) printf(%d,x[i])。char style。 int*paoup(int x[],int n)。 printf(請輸入將要輸入數(shù)據(jù)的個(gè)數(shù) \n)。 for(i=0。 if(n==10) printf(以下為調(diào)用原始函數(shù)后的排序結(jié)果 \n)。sort1,x,n)。 sort2(x,n,style) 。 show(amp。paodown,x,n)。 int aver。 int e,f,g,i。 e=qnum。 free(q)。 x=head。f=qscore1。 return x。 return e。in。 } return a。in。 } return a。inextnext。iaver=javer。jnum=b。 d=iscore2。 int average(struct student*p) 。 pscore1=j。 return p。 for(i=p。 anextscore1=d。 bnext=NULL。 struct student*h。 struct student*Delete(struct student*p,struct student*head)。 struct student*Delete2(struct student*p,struct student*head)。n)。i++) {scanf(%d%d%d,amp。 g=p。 } p=head。i++) { printf(%d,%d\n,pnum,average(p))。 a=max(p,n)。i++) {if(a==average(p))printf(%d,%d,%d,%d\n,pnum,pscore1,pscore2,a)。 b=min(p,n)。i++) {if(b==average(p))printf(%d,%d,%d,%d\n,pnum,pscore1,pscore2,b)。m)。} else{ if(headnum==m)h=head。 p=pnext。} for( p=head。 p=head。p=pnext) { printf(%d,%d,%d,%d\n,pnum,pscore1,pscore2,paver)。A,amp。 printf(輸出節(jié)點(diǎn)的第一個(gè)數(shù)據(jù) \n)。 scanf(%d%d%d,amp。 inserttail(p,E,D,X)。p=pnext) 36 printf(%d,%d,%d,%d\n,pnum,pscore1,pscore2,paver)。 int aver。i10。i++) {if(stu[i].score[n]==m) printf(score%d 最高分的學(xué)生名字學(xué)號(hào)成績分別為: %s%5d%5d\n,n,stu[i].name,stu[i].num,stu[i].score[n])。 } //===================================================== int high_aver(struct student stu[10]) /*求最高平均分 */ {int avere(struct student stu[10],int i)。i++) {b=avere(stu,i)。int i。i10。} //======================================= void save1(struct student stu[10]) //讀取文件信息 { FILE*fp。} printf(以下為 中讀出的數(shù)據(jù) \n)。stu[i],sizeof(struct student),1,fp)。int i。 for(i=0。stu[i],sizeof(struct student),1,fp)。 struct student t。 for(i=0。j10。stu[k]=t。 exit(0)。i+=2) {fseek(fp,i*sizeof(struct student),0)。 } fclose(fp)。 void reading(struct student stu[10])。 void px(struct student stu[10])。i10。stu[i].score[0],amp。 save1(stu)。 printf(平均分最高的學(xué)生的名字,學(xué)號(hào),平均分為 \n)。 b=high_aver(stu)。} 42 px(stu)。 char name[20]。 char position[30]。 struct teacher *next。 p=(struct teacher*)malloc(sizeof(teacher))。 printf(請輸入教師的姓名 \n)。 scanf(%s,amp。page)。 printf(請輸入教師的職位 \n)。 scanf(%d,amp。paddr)。 if(Lnext==NULL) {pnext=NULL。} 44 printf(輸出新增后的結(jié)果 \n)。 t=Lnext。 t=tnext。 if(Lnext==NULL) { printf(數(shù)據(jù)為空 ,不能進(jìn)行刪除操作 \n)。 p=L。 pnext!=NULL) {q=p。} return L。 printf(請輸 入教師號(hào) \n)。amp。} printf(姓名 %s\n 性別 %s\n 年齡 %d\n 學(xué)歷 %s\n 職稱 %s\n 工資 %d\n 住址 %s\n 電話 %d\n, pname,psex,page,peducation,pposition,pwage,paddr,pphone)。 long int a,k。 char e[50],w[50]。inext。jnum=inum。 strcpy(jname,p)。 strcpy(jsex,o)。 iage=x。strcpy(ieducation,e)。strcpy(iposition,f)。 strcpy(h,jaddr)。 k=jphone。 } //======================================================== struct teacher* fix(struct teacher *L) //修改教師信息 { long int teach_num。 scanf(%ld,amp。 pnext!
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1