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

正文內(nèi)容

學(xué)生成績管理系統(tǒng)源代碼_(數(shù)據(jù)結(jié)構(gòu)與算法課設(shè))c語言版-在線瀏覽

2024-09-17 06:13本頁面
  

【正文】 級成績信息:\n)。 printf(學(xué)號\t\t姓名\t\t數(shù)據(jù)庫\t算法\tC語言\t總成績\t平均成績)。*/ printf( ==================\n\n)。 printf(┃學(xué)號 ┃ 姓名 ┃數(shù)據(jù)庫┃ 算法 ┃ C語言┃總成績┃ 平均成績 ┃\n)。 for (i = 0。 i++) /*循環(huán)輸出學(xué)員信息*/ { output_stu(stu, count, i)。 break。 printf(\t\t1:算法\n)。 printf(\t\t3:平均成績\n)。 printf(\n\n請選擇成績統(tǒng)計的項目)。 flag_stat = scanf(%d%c, amp。a)。amp。\n39。 stat_stu(stu, count, stat_choice)。 stat_stu(stu, count, stat_choice)。 stat_stu(stu, count, stat_choice)。 stat_stu(stu, count, stat_choice)。 } else /*其它錯誤選擇提示重新輸入*/ { printf(\n您的輸入有誤,請重新輸入!)。 } } stat_choice =getchar()。 break。 //實現(xiàn)用戶的查找功能 /*根據(jù)查找函數(shù)的返回值為用戶顯示查找的信息*/ if (flag_find 0) /*返回值大于0,用戶選擇的是姓名查找方式*/ { printf(\n 學(xué)號\t\t姓名\t\t數(shù)據(jù)庫\t算法\tC語言\t總成績\t平均成績\n)。 printf(\n)。 } else /*返回值大于0,用戶選擇的是學(xué)號查找方式*/ { printf(\n 學(xué)號\t\t姓名\t\t數(shù)據(jù)庫\t算法\tC語言\t總成績\t平均成績\n)。 printf(\n)。 case (5): flag_find = find_stu(stu, count)。 output_stu(stu, count, flag_find1)。 } else if (flag_find == 0) /*查找失敗返回失敗信息*/ { printf(\n對不起沒有找到您的成績!\n)。 output_stu(stu, count, flag_find1)。 } if (flag_find != 0) /*查找成功的情況下用戶可選擇修改或刪除操作*/ { fflush(stdin)。 /*接收用戶選擇是否進行下一步操作*/ while (man_choice) /*判斷用戶的選擇*/ { printf(\t\t1:修改\n)。 printf(\t\t3:退出\n)。 fflush(stdin)。con_choice)。 } else if (con_choice == 2) /*進行刪除操作,一旦刪除則無法再進行修改*/ { delete_stu(stu, count, flag_find)。 printf(\n刪除成功!\n)。 } else if (con_choice == 3) /*選擇4則break循環(huán)退出*/ { break。 } stat_choice = 0。 break。 write_text(stu, count)。 break。 count = add_text(stu, count)。 case (6): printf(\t\t\t學(xué)生成績排名信息:\n)。/*讀入文件信息*/ printf(\t\t\t)。 case (0): printf(\n\t\t\t確定您真的要退出嗎?(y/n))。 sign_main = getchar()。y39。Y39。 exit(0)。 break。 } system(pause)。 //清屏 system(color 71)。 返回值:空 */ void input_num(struct Student stud[], int n, int i) { int j。 /*k用于對是否有重復(fù)學(xué)號的判斷*/ int num_flag=0。 /*每次循環(huán)后令j和num_flag的值為0*/ num_flag = 0。 /*首次錄入學(xué)號*/ fflush(stdin)。 while (stud[n+i].num[j] != 39。) /*遍歷stud[n+i].num*/ { if (stud[n+i].num[j] 48 || stud[n+i].num[j] 57) /*判斷輸入是否錯誤并重新輸入*/ { j=0。 printf(\n\t\t學(xué)號:\t\t\t)。 scanf(%9s,stud[n+i].num)。 } }//循環(huán)結(jié)束 num_flag++。 k n+i。 //令num_flag printf(\n\t\t已存在這個學(xué)號!請重新輸入:\n)。 } else { num_flag++。 返回值:空 */ void input_name(struct Student stud[], int n, int i) { int j = 0。 //用戶首次輸入 fflush(stdin)。 while(stud[n+i].name[j] != 39。) //遍歷姓名對應(yīng)的字符串 { if ( stud[n+i].name[j] 65 || (stud[n+i].name[j] 90 amp。 stud[n+i].name[j] 97) || stud[n+i].name[j] 122) /*如果輸入格式不正確則重新輸入*/ { j=0。 printf(\n\t\t姓名:\t\t\t)。 scanf(%15s, stud[n+i].name)。 } } } /*************************************************************************** 功能:從鍵盤輸入正確成績依次存放入stu[n].score中,同時計算出平均成績 和總成績存放入stu[n].score中。 返回值:空 */ void input_score(struct Student stud[], int n, int i) { int j。 //接收scanf()函數(shù)的返回值 int flag_score。 //用于判斷用戶中是否包含不合法輸入 printf(\n\t\t請輸入學(xué)生成績(1:數(shù)據(jù)庫。3:C語言):\n)。 j 3。 flag_score = 0。 fflush(stdin)。stud[n+i].score[j],amp。 /*輸入成績并返回正確接收的次數(shù)*/ if ((stud[n+i].score[j] 0 || stud[n+i].score[j] 100) || (h != 2) || (x != 39。)) /*用戶輸入不合法則提示重新輸入并產(chǎn)生循環(huán)條件*/ { flag_score = 1。 } }while(flag_score 0)。 /*計算總成績并錄入*/ for(j = 0。 j++) { stud[n+i].score[4] = stud[n+i].score[4] + stud[n+i].score[j]。 /*計算平均成績并錄入*/ } /*************************************************************************** 功能:格式化輸出一名學(xué)員信息 參數(shù):參數(shù)struct Student stud[ ]代表結(jié)構(gòu)體數(shù)組首地址, n代表已有成員個數(shù),i代表本次輸出其中的第i個成員。 //用于控制循環(huán)依次輸出三門成績 printf(┃ %10s┃%15s, stud[i].num, stud[i].name )。 j 3。 } printf( ┃%.1f, stud[i].score[4])。 //輸出平均成績 printf( ┃\n)。} /*************************************************************************** 功能:對某項成績中所有元素總和求平均 參數(shù):參數(shù)struct Student stud[ ]代表結(jié)構(gòu)體數(shù)組首地址, n代表成員個數(shù),o代表該項成績的下標。 //用于控制for循環(huán)次數(shù) float ach_avr = 0。
點擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1