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

正文內(nèi)容

編程實習報告09061109-楊宇超-展示頁

2024-08-18 07:35本頁面
  

【正文】 else if (menu == 2) DeleteStudent(amp。students,amp。 continue。 continue。if (sscanf(line,%d,amp。fflush(stdout)。int menu。int** marks = NULL。exit(1)。char* ReadLine()。void ShowClass(char** students,int** marks)。void DeleteStudent(char*** students,int*** marks)。 顯示所有學生信息基本想法:直接用printf 輸出,void EditMarks(char** students,int** marks)。N次排序 先進行n1次比大小,找到最小的,與第一個交換,再進行n2次。若不是,則用一個while 將后面的所有學生向前移一位 直到NULL,再釋放最后的內(nèi)存,最后再釋放學生姓名的那個內(nèi)存void SortClass(char** students,int** marks)。void DeleteStudent(char*** students,int*** marks)。插入學生姓名 基本想法:先讀取學生姓名,判斷指針是否為空,為空則建立內(nèi)存。void EditMarks(char** students,int** marks)。void SortClass(char** students,int** marks)。關(guān)鍵字:C語言、用字符串指針、學生信息一、任務(wù)要求(用字符串指針實現(xiàn)學生成績管理系統(tǒng)。 編 程 實 習 報 告 (2009屆)題 目: 用字符串指針實現(xiàn)學生成績管理系統(tǒng)姓 名: 楊宇超 學 號: 09061109 學 院: 自動化學院 班 級: 09063011 指導教師: 席旭剛 高云園2022年8月20日 2011年7月5日摘要:本文介紹運用C語言中單用字符串指針實現(xiàn)一個學生信息管理工具軟件,主要功能有:add、show、sort、Delete。程序由七個子函數(shù)(creat、edit、extra、imdelete、print、save、)和一個主函數(shù)(main)組成。完成函數(shù)void DeleteStudent(char*** students,int*** marks)。void ShowClass(char** students,int** marks)。二、詳細設(shè)計(分析各函數(shù)的功能,設(shè)計各函數(shù)的處理過程及其流程圖)void InsertStudent(char*** students,int*** marks)。否則再開拓新的內(nèi)存空間,然后將讀取的學生與名單一一比較,若相同,則顯示已存在該學生,若沒有,則開拓內(nèi)存給新到的學生,并對名單進行排序,最后釋放內(nèi)存。刪除學生信息基本想法:先讀取要刪除的學生姓名,將讀入的學生姓名與已存在的學生進行比較,如相同,記住該學生所在位置,判斷該學生下一個是否為空,若為空,就可以直接把該學生內(nèi)存釋放掉。 排序 根據(jù)學生姓名基本想法:采用冒泡法來進行排序。void ShowClass(char** students,int** marks)。 編輯學生成績基本想法:先讀取要編輯的學生姓名,然后與所有的學生姓名進行比較,判斷是否在名單內(nèi),若不在,就輸出不在,否則 就再讀取該學生的5個成績到 marks 三、編碼實現(xiàn)include include include void InsertStudent(char*** students,int*** marks)。void SortClass(char** students,int** marks)。void EditMarks(char** students,int** marks)。define merror(a) {printf(memory allocation error %d\n,a)。}/* function main */int main(){char** students = NULL。char line[100]。while(1) {printf(Enter (1) to Add a Student to Class List\n (2) to Delete a Student from Class List\n (3) to show Class List\n (4) to Edit marks of a Student\n (5) to Quit\n)。gets(line)。menu) != 1){ printf(incorrect entry)。}if (menu 1 || menu 5){ printf(incorrect selection)。}if (menu == 1) InsertStudent(amp。marks)。students,amp。else if (menu == 3) ShowClass(students,marks)。else break。//read here}/*end main*//* function InsertStudent *//*This function prompts the user to enter a new student name.The precise form of the prompt is Enter Student Name to be added to Class List:Then this function reads the name from standard input.But it must be able to read any name of any size!! Thus you haveto allocate memory (using malloc()) to read the input into, and ifit is not big enough, must use realloc() to extend it. You are notallowed
點擊復制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1