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

正文內(nèi)容

c語言課程設(shè)計(jì)-航班信息管理系統(tǒng)(編輯修改稿)

2025-01-21 14:58 本頁面
 

【文章內(nèi)容簡介】 n, pla1price)。 make_line(39。_39。, 50)。 printf(警告 !您確定要?jiǎng)h除該航班嗎 ? (y / n) )。 fflush(stdin)。 del_pla = getchar()。 if (del_pla != 39。y39。 amp。amp。 del_pla != 39。Y39。) return。 if (pla_head == pla1) pla_head = pla1next。 else pla2next = pla1next。 free(pla1)。 gsave = 1。 save_pla_info()。 printf(刪除成功 ! 任意鍵返回 \n)。 getch()。 return。 C 語言課程設(shè)計(jì)報(bào)告 14 } else { pla2 = pla1。 pla1 = pla1next。 } } printf(\n 未找到航班信息 !\n)。 goto del_again。 return。 } /* 檢查字符串 */ void check_string(char name[20]) { int i, flag = 0。 char check[20]。 for (i = 0。 i 20。 i++) check[i] = 0。 fflush(stdin)。 while (scanf(%s, check)) { fflush(stdin)。 for (i = 0。 i 20。 i++) { if (check[i]65 amp。amp。 check[i]32 || check[i]97 amp。amp。 check[i]90 || check[i]=127 amp。amp。 check[i]122) { flag = 1。 break。 } } if (flag == 1) { for (i = 0。 i 20。 i++) check[i] = 0。 flag = 0。 printf(\n 輸入出錯(cuò),請重新輸入 : )。 } else { strncpy(name, check, 20)。 break。 } } } /* 訂票處理 */ C 語言課程設(shè)計(jì)報(bào)告 15 void buy_ticket(PLA *pla1) { int i。 FILE *fd。 PSG *psg1 = NULL。 if ((fd = fopen(, a+)) == NULL) { printf(打開文件 出錯(cuò) !\n)。 getch()。 return。 } psg1 = (PSG *)malloc(LEN1)。 if (psg1 == NULL) { printf(分配內(nèi)存失敗,按任意鍵退出 !\n)。 getch()。 return。 } system(cls)。 psg1p_num = pla1p_num。 // 航班號 psg1site_num = pla1buy_num。 // 座位號 printf(警告:請勿惡意輸入,否則將導(dǎo)致您訂票失敗 !\n)。 printf(請輸入您的相關(guān)信息: \n)。 fflush(stdin)。 make_line(39。_39。, 70)。 printf(身份證號: )。 id_again: for (i = 0。 i 20。 i++) psg1id_num[i] = 0。 scanf(%s, psg1id_num)。 if (psg1id_num[17]==0 || psg1id_num[18]!=0) { printf(\n 您輸入的身份證號碼長度有誤,請檢查后重新輸入 : )。 goto id_again。 } for (i = 14。 i 17。 i++) { if (psg1id_num[i]65 amp。amp。 psg1id_num[i]57 || psg1id_num[i]48 || psg1id_num[i]97 amp。amp。 \ psg1id_num[i]90 || psg1id_num[i]=127 amp。amp。 psg1id_num[i]122) { printf(\n 您輸入的身份證號碼有誤,請檢查后重新輸入 : )。 goto id_again。 } C 語言課程設(shè)計(jì)報(bào)告 16 } for (i = 0。 i 14。 i++) { if ( !(psg1id_num[i]=39。939。 amp。amp。 psg1id_num[i]=39。039。) ) { printf(\n 您輸入的身份證號碼有誤,請檢查后重新輸入 : )。 goto id_again。 } } printf(姓名: )。 check_string(psg1name)。 printf(性別 (男 /女 /male/female): )。 sex_again: fflush(stdin)。 scanf(%s, psg1sex)。 if (strcmp(psg1sex, 男 ) amp。amp。 strcmp(psg1sex, 女 ) amp。amp。 strcmp(psg1sex, male) amp。amp。 strcmp(psg1sex, female)) { printf(\n 輸入出錯(cuò),請輸入您的正確性別: )。 goto sex_again。 } printf(出生年月 (如 :199410): )。 // psg1born = (char *)malloc(8)。 born_again: // for (i = 0。 i 8。 i++) // psg1born[i] = 0。 fflush(stdin)。 while (scanf(%d%d, amp。psg1year_born, amp。psg1month_born) != 2) { fflush(stdin)。 printf(\n 輸入出錯(cuò),請重新輸入 : )。 } if (psg1year_born 2021 || psg1year_born 1900 || psg1month_born 12 || psg1month_born 1) { printf(\n 您輸入的出生年月有誤,請檢查后重新輸入 : )。 goto born_again。 } psg1next = NULL。 if (pla1first == NULL) { // 指向 第一個(gè)乘客 pla1first = psg1。 } else { psg_end = pla1first。 C 語言課程設(shè)計(jì)報(bào)告 17 while (psg_end) { if (NULL == psg_endnext) { psg_endnext = psg1。 } else { psg_end = psg_endnext。 } } } if (fwrite(psg1, LEN1, 1, fd) != 1) { printf(保存信息出錯(cuò) !\n)。 fclose(fd)。 getch()。 return。 } fclose(fd)。 // free(psg1born)。 free(psg1)。 return。 } /* 訂票檢查 */ void buy_check(PLA *pla1) { char find = 39。y39。 if ((pla1l_num pla1buy_num) 1) { printf(該航班乘客數(shù)已滿,請預(yù)訂其他航班 .\n)。 getch()。 return。 } printf(您是否需要預(yù)訂該航班機(jī)票 ? (y / n) )。 fflush(stdin)。 find = getchar()。 if (39。y39。 != find amp。amp。 39。Y39。 != find) { return。 } buy_ticket(pla1)。 printf(\n 信息輸入完畢,您已成功預(yù)訂 %2d:%2d 分飛往 %s 的 %d 航班,您的座位號是: %d.\n, \ pla1up_hour, pla1up_min, pla1addr_dst, pla1p_num, ++pla1buy_num)。 bflag = 1。 // 訂票成功 C 語言課程設(shè)計(jì)報(bào)告 18 gsave = 1。 save_pla_info()。 // 保存文件 } /* 按航班號查詢 */ void search_pla_num(void) { int num。 char find。 PLA *pla1, *pla2。 while (1) { buy_again: printf(請輸入你需要預(yù)訂的航班號 (非數(shù)字鍵返回上層 ): )。 fflush(stdin)。 if (!(scanf(%d, amp。num))) return。 pla1 = pla_head。 pla2 = pla1。 while (pla1) { if (num == pla1p_num) { printf(\n 航班: %d 的信息如下: , pla1p_num)。 printf(\n 航班號 載客數(shù) 起飛時(shí)間 降落地點(diǎn) 降落時(shí)間 單價(jià) 剩余票數(shù) \n)。 make_line(39。_39。, 70)。 printf(%d%9d%6d:%2d%11s%7d:%2d%7s%8d\n, pla1p_num, pla1l_num, \ pla1up_hour, pla1up_min, pla1addr_dst, pla1down_hour, pla1down_min, pla1price, (pla1l_num pla1buy_num))。 make_line(39。_39。, 70)。 buy_check(pla1)。 make_line(39。_39。, 70)。 printf(繼續(xù)訂票請鍵入 \y\,其他鍵返回上一層菜單: )。 fflush(stdin)。 find = getchar()。 if (39。y39。 != find amp。amp。 39。Y39。 != find) return。 goto buy_again。 } else { pla2 = pla1。 C 語言課程設(shè)計(jì)報(bào)告 19 pla1 = pla1next。 } } printf(\n 未找到該 航班信息 !\n)。 // getch()。 // return。 } } /* 按降落地點(diǎn)查詢 */ void search_destination(void) { int num = 0。 char dst[15]。 PLA *pla1, *pla2。 printf(請輸入目的地: )。 scanf(%s, dst)。 pla1 = pla_head。 pla2 = pla1。 while (pla1) { if (strcmp(dst, pla1addr_dst) == 0) { /* 有多個(gè)航班有同一個(gè)降落地點(diǎn)時(shí) */ if (num == 0) { // 只顯示一次 printf(\n 航班號 載客數(shù) 起飛時(shí)間 降落地點(diǎn) 降落時(shí)間 單價(jià) 剩余票數(shù) \n)。 make_line(39。_39。, 70)。 num++。 } printf(%d%9d%6d:%2d%10s%8d:%2d%7s%7d\n, pla1p_num, pla1l_num, pla1up_hour
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1