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

正文內容

c語言學生信息管理系統(tǒng)報告-免費閱讀

2026-01-16 15:02 上一頁面

下一頁面
  

【正文】 } struct node * sortManage(struct node *head) //根據(jù)條件排序模塊的實現(xiàn) { int choice。 for(p=head2。 printf(\n\n)。p=pnext,count++)//head 鏈 是按學號排序的,逐個讀出學生記錄 head2=InsertOrder(head2,pdata,2)。//對 head2 中當前結點依學號在 head 鏈中找到 (qdata).rank=countcurrent+1。 for(p=head。p=pnext) { current++。 } struct node *nameSort(struct node *head) { struct node*head2=NULL,*p,*q。 for(p=head2。 } }while(choice)。 case 3:averMark(head)。 for(i=0。 //調用二級菜單顯示函數(shù) printf(choose one operation you want to do:)。i3。 //count 用來統(tǒng)計總人數(shù) for(i=0。// 輸出記錄 //printf( 學生名次: %d\n\n,(qdata).rank)。 //輸出表頭 for(p=head。//對 head2 中當前結點依學號在 head 鏈中找到 (qdata).rank=countcurrent+1。 //count 統(tǒng)計學生總人數(shù),即單鏈表的結點個數(shù) for(p=head。 case 0: break。 //讀入學號,據(jù)學號進行刪除 head=Delete(head,data)。 //輸入選擇項 printf(\n)。\n\n)。 amp。 printf(amp。amp。amp。amp。amp。 printf( \n)。 printf(%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%\n)。 printf(******** ********\n)。 printf(\n)。 while(p) 33 { q=pnext。 //如果沒有找到要刪除的結點,則 q和 p同時向后移動一個結點的位置,q始終是 p的前趨 p=pnext。data)。 //返回頭指針 } struct node*CreateInsert() { struct node*head。 p2=head。amp。 //此時隱含條件為 p 等于空,未找到,返 回空指針 } struct node*InsertOrder(struct node*head,Type data,int condition) 30 { struct node*p,*p1,*p2。 //返回頭指針 } struct node*SearchNode(struct node*head,Type data,int condition) //單鏈表的查找 { struct node *p=head。 struct node*printList(struct node*head) //鏈表的遍歷 { struct node*p。 struct node*CreateForward()。 exit(0)。 printf(\n)。 } struct node *readFile(struct node *head) { Type data。 information,ended with num=NUT\n)。 else if(condition==5) return [3][3]。 else return 0。i++) { scanf(%d,amp。 printf(birthday:)。 printf(num:)。 printf(%8d ,)。 for(i=0。 } void sortprintNode(Type data) { printf(%9s ,)。 printf(%15s ,)。 typedef struct Student Type。 21 附:各模塊的代碼(不屬于報告內容) //文件 的完整代碼 : ifndef _NODE define _NODE struct Student { char num[10]。 通過這次課程設計我對 C語言的神奇功能更加佩服(只是一個程序運行卻可以完成學生管理系統(tǒng)功能),我默默在心里發(fā)誓一定要把 C 語言學好,而且現(xiàn)在正在學習 C語言,熟練的掌握編程的方法。 問題四、程序不能執(zhí)行 解決辦法及步驟: 關閉可執(zhí)行文件。39。關鍵代碼如下: if(head==NULL) { printf(\nNo Records\n)。 //循環(huán)停止時 p非空,表示找到了結點,返回指針 P 其代碼簡單,主要比較是否找到匹配項,如果找到就輸出。實現(xiàn)了輸出記錄的功能。amp。 else if(condition==4) return [2][2]。 else //否則 p插在 p1 的后面 p1next=p。 //數(shù)據(jù)域賦值 pnext=NULL。 //對 head2 中當前結點依學號在 head 鏈中找到 (qdata).rank=countcurrent+1。 //count 統(tǒng)計學生總人數(shù),即單鏈表的結點個數(shù)for(p=head。nameSort(head)。i3。 averprintNode(pdata)。 “計算三門課程平均分”調用 averMark(head)。//輸出表頭 for(p=head2。i3。!equal(pdata ,data,condition))//equal 用來 判斷兩個參數(shù)是否相等 { //當 p非空且當前結點的數(shù)據(jù)值不等于要搜索的值 data 時 p=pnext 。 //p2 作為 p的后繼結點,即 p插在 p1 和 p2 之間 return p2。 p2=head。和 Insert(head,data,1)。p。 readNode(amp。 while(!feof(fp)) { head=Insert(head,data,1)。 menuScore()。對鏈表而言,其結點永遠只含有兩個成員: Type 類型的 data 成員和 8struct node*類型的 next 成員。 struct node { Type data。 char sex[10]。而為了在學生管理系統(tǒng)中體現(xiàn)結構化的程序設計思想,需要在系統(tǒng)采用多個文件多個函數(shù)來實現(xiàn)功能,通過對功能的逐步細化使得最終的每一個函數(shù)都完成一個非常具體又簡單的功能。 相關數(shù)據(jù)要求格式如下: 學生資料文件 存放了學號、姓名、性別 、出生日期、 A 課程成績、 B 課程成績、 C課程成績格式如下: B051001 張三 女 19870201 80 82 77 B051002 李四 女 19870301 80 80 80 B051003 王二 男 19870401 85 80 80 。 ( 3)能夠按照不同的條件查詢學生信息,并顯示在屏幕上。 5 三、概要設計 按姓名排序 按總分排序 按C課程成績排序 按B課程成績排序 按A課程成績排序 按學號排序 學生管理系統(tǒng) 根據(jù)條件排序 修改學生記錄 插入學生記錄 基本信息管理 刪除學生記錄 顯示基本信息 根據(jù)條件查詢 按姓名查詢 按學號查詢 學生成績管理 計算三門課程平均分數(shù) 計算各門課程的平均分數(shù) 計算學生總分 計算學生名次 6 設計流程圖如下: 編輯學生信息 開始 輸入學生信息 保存信息 查詢信息 保存文件 退出 否 是 7 根據(jù)題目要求,一個學生信息包含:學號、姓名、性別、 3 門課的成績、總分、各科成績平均分、所有學生單科平均分以及名次。 int total,rank。 const int size=sizeof(struct node)。 所有的菜單都是通過定義函數(shù),并被其他函數(shù)調用后實現(xiàn)的。 對應功能模塊 學生信息管理系統(tǒng) 基本信息管理 學生成績管理 根據(jù)條件 排序 根據(jù)條件 查詢 調用 函數(shù) main 函數(shù) baseManage 函數(shù) scoreManage 函數(shù) sortManage 函數(shù) searchManage 函數(shù) 首先執(zhí)行文件打開操作,調用函數(shù) readFile(),如果原始文件不存在,則調用函數(shù)createFile()創(chuàng)建文件, 輸入初始的學生信息:其中包括學生的姓名、學號和性別以及學生的 三門課程成績 等相關信息; 其中調用函數(shù) Insert()函數(shù) 。data,sizeStu,1,fp)。 進入一級菜單,調用 do~while 語句可以實現(xiàn)多次進入一級菜單,調用一級菜單函數(shù) menu()顯示一級菜單,輸入一級菜單選擇項,如果輸入的數(shù)據(jù)在可能選項內,調用runMain()函數(shù)完成系統(tǒng)功能。 } 基本信息管理模塊:可用 baseManage(head)函數(shù)來實現(xiàn) ,并調用 menuBase()。 函數(shù) 執(zhí) 行 了 學 生 信 息 的 刪 除 ,SearchNode(head,data,1)。 // 數(shù) 據(jù) 域 賦 值 pnext=NULL。//修改 q的 next 域,使 p的后繼成為 q的后繼 else//如果刪除的不是第一個結點 11 head=headnext。表頭函數(shù) printHead()。} “計算學生名次”調用了 rankCalculate(head)。 //每掃描到一個結點計算器 current 加 1 q=SearchNode(head,pdata,1)。p=pnext) { double m=0。函數(shù),其關鍵代碼如下: int i,count=0。i3。CscoreSort(head)。 //依次將學生記錄依總分由低到高建鏈表 head2 rankprintHead()。 } InsertOrder(head2,pdata,2)。 } while(p2amp。 中又調用了調用了函數(shù)larger(pdata,p2data,condition),這是通過比較確定參數(shù)的函數(shù),關鍵代碼如下: if(condition==1) if(strcmp(,)=0) //比較學號 return 1。 return 1。 //輸出表頭 sort_printNode(pdata)。
點擊復制文檔內容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1