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

正文內(nèi)容

c語言課程設(shè)計-航班信息管理系統(tǒng)(留存版)

2025-02-14 14:58上一頁面

下一頁面
  

【正文】 char ch = 39。 printf(\n 鍵入“ C”繼續(xù)添加信息,其余鍵返回 : )。 } ch = 39。 } } /* 修改數(shù)據(jù) */ void modify_data(void) { int num, m, i。 make_line(39。 printf(載客數(shù): )。 printf(單價: )。繼續(xù)修改,其余鍵返回主菜單 )。 return。y39。 fflush(stdin)。 fflush(stdin)。, 70)。) { fclose(fp)。 } else { pla_endnext = pla1。 printf(\t\t 請選擇您需要的操作 (06): )。239。 break。 printf(該系統(tǒng)中 暫無航班信息,請先添加航班信息 !\n)。 system(cls)。 return 0。 這次的課程設(shè)計讓我對 C 語言的知識更加扎實了,也勾起了我深入學習 C 語言的興趣。 read_pla_data()。 } exit(0)。 break。 printf(該系統(tǒng)中暫無航班信息,請先添加航班信息 !\n)。 } display_pla_info()。 printf(\t\t| 5. 修改航班信息 |\n)。 // 把數(shù)據(jù)讀入內(nèi)存中 pla1first = NULL。 amp。\n39。 check_time(amp。 m = check_pla_num(pla)。 } pfirst = 0。 else goto modify_again。 } C 語言課程設(shè)計報告 24 } printf(\n 未找到航班信息 !\n 輸入 39。 printf(降落時間 (24 小時制 ): )。 != mod_pla) return。 make_line(39。) { fflush(stdin)。 } system(cls)。 while (pla1) { if (pla1p_num == p_num) { printf(\n 航班 %d 已存在,請重新確認 !\n, pla1p_num)。 default: printf(錯誤 !請重新輸入 : )。 while (n) { search_again: fflush(stdin)。 C 語言課程設(shè)計報告 20 getch()。 scanf(%s, dst)。y39。 printf(\n 航班號 載客數(shù) 起飛時間 降落地點 降落時間 單價 剩余票數(shù) \n)。 != find) { return。 free(psg1)。psg1year_born, amp。 scanf(%s, psg1sex)。 psg1id_num[i]122) { printf(\n 您輸入的身份證號碼有誤,請檢查后重新輸入 : )。, 70)。 PSG *psg1 = NULL。amp。 return。 fflush(stdin)。 display_pla_info()。 puts(tmp)。 continue。 } gsave = 0。 return。 // 下一航班 struct PSG *first。 int year_born。 算法:進入查詢后顯示另一個菜單要求用戶選擇相應的查詢條件。 保存新航班數(shù)據(jù)到文件 圖 3 輸入航班數(shù)據(jù)流程圖 顯示瀏覽航班信息:顯示信息 包括航班號、最大載客數(shù)、起飛地點、起飛時間、降落地點、降落時間、單價、剩余票數(shù),調(diào)用了時間函數(shù) localtime()獲取當前系統(tǒng)時間;用函數(shù) void display_pla_info(void)完成此操作。假設(shè)現(xiàn)收集到了一個機場的所有的航班信息,要求用 C 語言編寫一個簡單的航班信息管理系統(tǒng),可進行錄入、查詢、修改和瀏覽航班信息的功能;乘客提出航班號、起飛地點、起飛時間、降落地點、訂票數(shù)等訂票要求,根據(jù)事先保存的航班數(shù)據(jù)決定乘客能否訂票。 pla_end = pla1。 pla2next = pla1next。 顯示信息 pla1 = pla1next。 // 起飛時 int up_min。 if ((fd = fopen(,wb)) == NULL) { printf(\n 無法打 開文件 !)。 return。 i=1) { if ((i = scanf(%d:%d, hour, min)) != 2) { printf(輸入格式錯誤 ! 請以 \小時 :分鐘 \格式重新輸入 : )。 struct tm *timeinfo。_39。_39。 if (pla_head == pla1) pla_head = pla1next。 i 20。 i++) check[i] = 0。 psg1p_num = pla1p_num。 i 17。039。 } printf(出生年月 (如 :199410): )。 } else { psg_end = psg_endnext。 find = getchar()。 while (1) { buy_again: printf(請輸入你需要預訂的航班號 (非數(shù)字鍵返回上層 ): )。 make_line(39。 } } printf(\n 未找到該 航班信息 !\n)。 make_line(39。 printf(\t1. 按航班號查詢 \n)。239。 == ch) { printf(航班號: )。 if (ch != 39。 } /*檢查價格 */ void check_price(char price[10]) { int i。 display_pla_info()。 mod_pla = getchar()。 } printf(起飛時間 (24 小時制 ): )。 save_pla_info()。 if (ch != 39。 } fread(psg1, LEN1, 1, fd)。 getch()。 C 語言課程設(shè)計報告 26 fflush(stdin)。 if (pla_head == NULL) { pla_head = pla。繼續(xù)添加航班信息,其余鍵返回 )。 if ((fp = fopen(, rb)) == NULL) { gfirst = 1。 } void menu(void) { system(cls)。 goto input_agn。 } display_pla_info()。 case 39。 case 39。 printf(\n\n\n\n\n\n\t\t\t 歡迎使用廣工大航班信息管理系統(tǒng) \n)。用 strncpy(name, check, 20)替換 strcpy(name, check)即可。里面的“ ”格式有誤, 改成 printf(繼續(xù)訂票請鍵入 \y\,其他鍵返回上一層菜單: )。*39。: system(cls)。: if (gfirst) { system(cls)。 getch()。139。 printf(\t\t|航班信息管理系統(tǒng) |\n)。 } while (!feof(fp)) { pla1 = (PLA *)malloc(LEN)。 // 清除緩沖區(qū) scanf(%c, amp。 } else { pla_endnext = pla。plaup_hour, amp。 } while (1) { pla = (PLA *)malloc(LEN)。 // 檢查是否在文件尾 if(psg_head == NULL) { psg_head = psg1。 amp。 printf(原航班 %d 已成功修改為新航班 %d!, num, pla1p_num)。 check_time(amp。y39。 scanf(%d, amp。 i strlen(price)。 amp。 while (scanf(%d, amp。 search_destination()。 printf(\t0. 返回主菜單 \n)。, 70)。 // return。, 70)。 if (!(scanf(%d, amp。y39。 fclose(fd)。 born_again: // for (i = 0。 goto id_again。amp。 // 座位號 printf(警告:請勿惡意輸入,否則將導致您訂票失敗 !\n)。 printf(\n 輸入出錯,請重新輸入 : )。 fflush(stdin)。 free(pla1)。 printf(%4d%6d%7d:%2d%13s%7d:%2d%6s\n, pla1p_num, pla1l_num, \ pla1up_hour, pla1up_min, pla1addr_dst, pla1down_hour, pla1down_min, pla1price)。 pla1 = pla1next。 int pla_num = 0。 continue。 while (pla1) { if (fwrite(pla1, LEN, 1, fp) != 1) { printf(\n 寫入數(shù)據(jù)出錯 !)。 return。 // 降落地點 int down_hour。 提示訂票成功并返回 提示未找到航班信息后返回菜單 退出系統(tǒng):用戶在主菜單界面時按照提示即可退出系統(tǒng),調(diào)用一個 exit()函數(shù)來實現(xiàn)。 算法:顯示所有航班信息,用戶輸入一個航班號,在 while 循環(huán)中遍歷鏈表,找到要修改的數(shù)據(jù)則顯示出來,再次要求用戶確認修改,若修改,則開始輸入信息;若沒有找到航班則返回菜單。 算法:打開待保存輸入信息的文件,在一個 while 循環(huán)里面分配內(nèi)存并輸入數(shù)據(jù) ,對輸入的數(shù)據(jù)進行正確性驗證,如果出錯則會提示重新輸入,正確輸入完一個航班后將數(shù)據(jù)保存到鏈表尾端并將新的航班數(shù)據(jù)寫入打開的文件中。掌握運用 C語言獨立地編寫、調(diào)試應用程序和進行其他相關(guān)設(shè)計的技能。 pla_end = pla。 輸出該航班信息 pla1 = pla1next。 // 身份證號 char name[20]。 // 單價 int buy_num。 fclose(fd)。 return。 *hour = 0)) { printf(小時不在正常范圍 ! 請重新輸入 : )。 /* 顯示時間 */ system(cls)。 PLA *pla1, *pla2。, 50)。 printf(刪除成功 ! 任意鍵返回 \n)。 i 20。 } } } /* 訂票處理 */ C 語言課程設(shè)計報告 15 void buy_ticket(PLA *pla1) { int i。 make_line(39。 \ psg1id_num[i]90 || psg1id_num[i]=127 amp。 printf(性別 (男 /女 /male/female): )。 fflush(stdin)。 } fclose(fd)。 39。 pla2 = pla1。 find = getchar()。 PLA *pla1, *pla2。 } if (0 == num)
點擊復制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1