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

正文內(nèi)容

c語言學(xué)生管理系統(tǒng)源代碼-資料下載頁

2025-08-21 01:35本頁面
  

【正文】 要?jiǎng)h除序號(hào)為%d的課程信息?確定Y,取消N:, num)。 scanf(%c, amp。isConf)。 if (39。Y39。 != isConf amp。amp。 39。y39。 != isConf) { printf(刪除操作被取消)。 resultCode = 1。 return resultCode。 } preSelectedItem = pCourse。 currentItem = pCourse。 while (currentItem != NULL) { if (currentItemnumCourse != num) { preSelectedItem = currentItem。 currentItem = currentItemnext。 } else { selectedItem = currentItem。 break。 } } if (NULL == selectedItem) { printf(沒有找到要求刪除的記錄!)。 } else { if (selectedItem == pCourse) //如果刪除的是頭結(jié)點(diǎn) { pCourse = selectedItemnext。 } else { preSelectedItemnext = selectedItemnext。 } free(selectedItem)。 resultCode = 1。 } return resultCode。}/*********************************************************************************************************@ 函數(shù)名稱:UpdateCourseInfo@ 作用:更新一個(gè)課程信息(菜單響應(yīng)函數(shù))@ 參數(shù):@ 返回值:成功返回1,失敗返回0*********************************************************************************************************/int UpdateCourseInfo(){ int resultCode = 0。 int num。 int isFind = 0。 CourseList* selectedItem = NULL。 CourseList* currentItem = NULL。 printf(請(qǐng)輸入要更新的課程編號(hào):)。 scanf(%d, amp。num)。 currentItem = pCourse。 while (currentItem != NULL) { if (currentItemnumCourse != num) { currentItem = currentItemnext。 } else { selectedItem = currentItem。 break。 } } if (selectedItem == NULL) { printf(沒有找到要求刪除的記錄!)。 } else { printf(請(qǐng)輸入編號(hào)為%d的課程的修改名字:, selectedItemnumCourse)。 scanf(%s, selectedItemname)。 printf(請(qǐng)輸入編號(hào)為%d的課程的修改任課老師名字:, selectedItemnumCourse)。 scanf(%s, selectedItemteacherName)。 resultCode = 1。 } return resultCode。}/*********************************************************************************************************@ 函數(shù)名稱:CourseNumIsOK@ 作用:檢測(cè)輸入的課程號(hào)是否已經(jīng)存在@ 參數(shù):待檢測(cè)的課程號(hào)@ 返回值:檢測(cè)到成功返回1,檢測(cè)不到返回0*********************************************************************************************************/int CourseNumIsOK(int codeCourse){ CourseList* currentItem = pCourse。 while(currentItem != NULL) { if (currentItemnumCourse == codeCourse) { return 1。 } else { currentItem = currentItemnext。 } } return 0。}/*********************************************************************************************************@ 函數(shù)名稱:SelectCourses4Student@ 作用:為學(xué)生選擇課程(菜單響應(yīng)函數(shù))@ 參數(shù):@ 返回值:*********************************************************************************************************/void SelectCourses4Student(){ int i, k。 int numStudent。 int numCourse。 char state。 int isFinished = 0。 printf(請(qǐng)輸入要選課的學(xué)生學(xué)號(hào):)。 scanf(%d, amp。numStudent)。 for (i = 0。 i stuNum。 i++) { if (stu[i].num == numStudent) { break。 } } if (i == stuNum) { printf(輸入的學(xué)號(hào)沒有找到對(duì)應(yīng)的學(xué)生,本次操作結(jié)束!)。 return。 } printf(當(dāng)前可以選擇的課程列表有:\n)。 ShowCourseInfoWithouScores()。 while(!isFinished) { fflush(stdin)。 printf(繼續(xù)選課請(qǐng)輸入字符Y,輸入其它字符結(jié)束選課:\n)。 scanf(%c, amp。state)。 if (39。Y39。 == state || 39。y39。 == state) { fflush(stdin)。 printf(請(qǐng)輸入一個(gè)課程編號(hào),為學(xué)生選課\n)。 scanf(%d, amp。numCourse)。 if (CourseNumIsOK(numCourse)) { CourseNumList* newCourseCode = malloc(sizeof(struct MyInt))。 ScoreList* newScore = malloc(sizeof(struct MyInt))。 newCourseCodenum = numCourse。 newCourseCodenext = NULL。 newScorenum = 0。 newScorenext = NULL。 if (stu[i].courseNumList == NULL) { stu[i].courseNumList = newCourseCode。 stu[i].courseScore = newScore。 stu[i].courseSize++。 } else { CourseNumList* currentItem = stu[i].courseNumList。 ScoreList* currentItem2 = stu[i].courseScore。 for (k = 0。 k stu[i].courseSize 1。 k++) { currentItem = currentItemnext。 currentItem2 = currentItem2next。 } currentItemnext = newCourseCode。 currentItem2next = newScore。 stu[i].courseSize++。 } } else { printf(輸入的課程編號(hào)不正確!選擇無效!)。 } } else { isFinished = 1。 } } printf(選課過程結(jié)束!\n)。}void UpdateCourses4Student(){ printf(系統(tǒng)暫不支持已選課程更新操作!)。}/*********************************************************************************************************@ 函數(shù)名稱:DeleteCourses4Student@ 作用:刪除學(xué)生已經(jīng)選擇的課程(菜單響應(yīng)函數(shù))@ 參數(shù):@ 返回值:成功返回1,失敗返回0*********************************************************************************************************/int DeleteCourses4Student(){ int resultCode = 0。 int i。 int numStudent。 int numCourse。 CourseNumList* preItem = NULL。 ScoreList* preItem2 = NULL。 CourseNumList* currentItem = NULL。 ScoreList* currentItem2 = NULL。 CourseNumList* selectedItem = NULL。 ScoreList* selectedItem2 = NULL。 printf(請(qǐng)輸入要?jiǎng)h除課程的學(xué)生的學(xué)號(hào):)。 scanf(%d, amp。numStudent)。 for (i = 0。 i stuNum。 i++) { if (stu[i].num == numStudent) { break。 } } if (i == stuNum) { printf(輸入的學(xué)號(hào)沒有找到對(duì)應(yīng)的學(xué)生,本次操作結(jié)束!)。 return resultCode。 } ShowOneStudentInfo(stu[i].num)。 ShowCourseInfoWithouScores()。 printf(\n)。 printf(請(qǐng)輸入要?jiǎng)h除的課程的課程編號(hào):)。 scanf(%d, amp。numCourse)。 preItem = stu[i].courseNumList。 preItem2 = stu[i].courseScore。 currentItem = stu[i].courseNumList。 currentItem2 = stu[i].courseScore。 while (currentItem != NULL) { if (currentItemnum != numCourse) { preItem = currentItem。 currentItem = currentItemnext。 preItem2 = currentItem2。 currentItem2 = currentItem2next。 } else { selectedItem = currentItem。 selectedItem2 = currentItem2。 break。 //默認(rèn)沒有重復(fù)的選課,系統(tǒng)在選課的時(shí)候沒有檢測(cè)是否已經(jīng)選擇該課 } } if (selectedItem == NULL) { printf(該學(xué)生沒有選擇輸入的課程,無法刪除!)。 } else { if (selectedItem == stu[i].courseNumList) { stu[i].courseNumList = selectedItemnext。 stu[i].courseScore = selectedItemnext。 } else { preItemnext = selectedItemnext。
點(diǎn)擊復(fù)制文檔內(nèi)容
化學(xué)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1