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

正文內(nèi)容

c語(yǔ)言課程設(shè)計(jì)論文(建筑工地信息管理系統(tǒng))-資料下載頁(yè)

2025-05-16 20:05本頁(yè)面

【導(dǎo)讀】首先建立文件,然后插入數(shù)據(jù),并進(jìn)行刪除、更新操作,最后進(jìn)行查詢操作。查詢與供應(yīng)商所在城市相同的零件——供應(yīng)商,項(xiàng)目——供應(yīng)商記錄對(duì)。應(yīng)提供鍵盤式選擇菜單實(shí)現(xiàn)功能選擇。據(jù)配對(duì)這幾個(gè)模塊。主函數(shù)一般設(shè)計(jì)得比較簡(jiǎn)潔,只提供輸入、處理和輸出部分的函數(shù)調(diào)用。塊用菜單方式選擇。其流程圖如圖2所示:。用字符型數(shù)組;銷售商號(hào)碼、配件號(hào)、工地號(hào)、號(hào)碼為整數(shù),采用整型。數(shù)據(jù)信息分別放在。4個(gè)文件中,每條記錄對(duì)應(yīng)相應(yīng)的字段內(nèi)容。

  

【正文】 ILE *fp。 if((fp=fopen(,wb))==NULL) { printf(Can not open the file!\n)。 exit(0)。 } for(j=0。ji。j++) fwrite(amp。pj[j],sizeof(struct peijian),1,fp)。 while(1) { printf(輸入配件號(hào) :\n)。 scanf(%d,amp。pj[i].num)。 printf(輸入配件名 :\n)。 scanf(%s,pj[i].name)。 printf(輸入配件顏色 :\n)。 scanf(%s,pj[i].color)。 printf(輸入配件重量 :\n)。 scanf(%d,amp。pj[i].weight)。 printf(輸入配件產(chǎn)地 :\n)。 scanf(%s,pj[i].area)。 if(fwrite(amp。pj[i++],sizeof(struct peijian),1,fp)!=1) printf(File write error\n)。 else printf(Successful!\n)。 loop:printf(Is there any more?( Yes[y]/No[n]) \n)。 scanf(%s,c)。 if(strcmp(c,n)==0)break。 else { if(strcmp(c,y)!=0) {printf(error!\n)。goto loop。} } } fclose(fp)。 menu()。 } void SET_enter () { int j。 char c[2]。 FILE *fp。 if((fp=fopen(,wb))==NULL) { printf(Can not open the file!\n)。 exit(0)。 } for(j=0。ji。j++) fwrite(amp。sel[j],sizeof(struct seller),1,fp)。 while(1) { printf(輸入銷售商號(hào) :\n)。 scanf(%d,amp。sel[i].num)。 printf(輸入銷售商名 :\n)。 scanf(%s,sel[i].name)。 printf(輸入銷售商狀態(tài) :\n)。 scanf(%s,sel[i].state)。 printf(輸入銷售商所在城市 :\n)。 scanf(%s,sel[i].city)。 if(fwrite(amp。sel[i++],sizeof(struct seller),1,fp)!=1) printf(File write error\n)。 else printf(Successful!\n)。 loop:printf(Is there any more?( Yes[y]/No[n]) \n)。 scanf(%s,c)。 if(strcmp(c,n)==0)break。 else { if(strcmp(c,y)!=0) {printf(error!\n)。goto loop。} } } fclose(fp)。 menu()。 } void enter() { int t,m。 do { puts(\t\t***************MENU*************\n\n)。 puts(\t\t\t\ new data)。 puts(\t\t\t\ new data)。 puts(\t\t\t\ new data)。 puts(\t\t\t\ new data)。 puts(\t\t\t\)。 puts(\n\n\t\t ********************************\n)。 printf(Choose the number(15):[ ]\b\b)。 scanf(%d,amp。m)。 if(m1||m5) { t=1。 getchar()。 } else t=0。 } while(t==1)。 switch(m) { case 1:sal_enter()。break。 case 2:build_enter()。break。 case 3:pj_enter()。break。 case 4:SET_enter()。break。 case 5:menu()。 } } /******************************刪除模塊 ************************************/ void sal_delete() { int j,v=0。 int x。 int w=101。 FILE *fp。 if((fp=fopen(,rb))==NULL) { printf(Can not open the file!\n)。 menu()。 } loop:printf(請(qǐng)輸入要?jiǎng)h除的銷售商號(hào)碼 (輸入 0 返回 menu):)。 scanf(%d,amp。x)。 if(x==0) menu()。 for(j=0。j100。j++) { if(fread(amp。sal[j],sizeof(struct sale),1,fp)!=1) break。 } v=j+1。 for(j=0。jv。j++) { if(x==sal[j].num1) {w=j。break。} } fclose(fp)。 if(w==101) {printf(Cannot find the data!\n\n)。goto loop。} else { fp=fopen(,wb)。 for(j=0。jv。j++) {if(j!=w) fwrite(amp。sal[j],sizeof(struct sale),1,fp)。} } printf(\n 銷售商號(hào)碼,配件號(hào),工地號(hào),數(shù)量 \n)。 printf( %d,\t\t%d, %d, %d\n,sal[w].num1,sal[w].num2,sal[w].num3,sal[w].num4)。 printf(刪除成功 !\n\n)。 fclose(fp)。 menu()。 } void build_delete() { int j,v=0,x。 int w=101。 FILE *fp。 if((fp=fopen(,rb))==NULL) { printf(Can not open the file!\n)。 menu()。 } loop:printf(請(qǐng)輸入要?jiǎng)h除的工地號(hào) (輸入 0 返回 menu):)。 scanf(%d,amp。x)。 if(x==0) menu()。 for(j=0。j100。j++) { if(fread(amp。build[j],sizeof(struct building),1,fp)!=1) break。 } v=j+1。 for(j=0。jv。j++) { if(x==build[j].num) {w=j。break。} }fclose(fp)。 if(w==101) {printf(Cannot find the data!\n\n)。goto loop。} else { fp=fopen(,wb)。 for(j=0。jv。j++) {if(j!=w) fwrite(amp。build[j],sizeof(struct building),1,fp)。} } printf(\n 項(xiàng)目號(hào) ,工地號(hào) ,工地名 ,城市名 :\n)。 printf( %d, \t%d, %s, %s\n,build[w].num1,build[w].num, build[w].name,build[w].city)。 printf(刪除成功 !\n\n)。 fclose(fp)。 menu()。 } void pj_delete() { int j,v=0,x。 int w=101。 FILE *fp。 if((fp=fopen(,rb))==NULL) { printf(Can not open the file!\n)。 menu()。 } loop:printf(請(qǐng)輸入要?jiǎng)h除的配件號(hào) (輸入 0 返回 menu):)。 scanf(%d,amp。x)。 if(x==0) menu()。 for(j=0。j100。j++) { if(fread(amp。pj[j],sizeof(struct peijian),1,fp)!=1) break。 } v=j+1。 for(j=0。jv。j++) { if(x==pj[j].num) {w=j。break。} }fclose(fp)。 if(w==101) {printf(Cannot find the data!\n\n)。goto loop。} else { fp=fopen(,wb)。 for(j=0。jv。j++) {if(j!=w) fwrite(amp。pj[j],sizeof(struct peijian),1,fp)。} } printf(\n 配件號(hào) ,配件名 ,顏色 ,重量 ,產(chǎn)地 :\n)。 printf( %d, %s, %s, %d, %s\n,pj[w].num,pj[w].name,pj[w].color,pj[w].weight,pj[w].area)。 printf(刪除成功 !\n\n)。 fclose(fp)。 menu()。 } void SET_delete () { int j,v=0。int x。 int w=101。 FILE *fp。 if((fp=fopen(,rb))==NULL) { printf(Can not open the file!\n)。 menu()。 } loop:printf(請(qǐng)輸入號(hào)碼 (輸入 0 返回 menu):)。 scanf(%d,amp。x)。 if(x==0) menu()。 for(j=0。j100。j++) { if(fread(amp。sel[j],sizeof(struct seller),1,fp)!=1) break。 } v=j+1。 for(j=0。jv。j++) { if(x==sel[j].num) {w=j。break。} }fclose(fp)。 if(w==101) {printf(Cannot find the data!\n\n)。goto
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1