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

正文內(nèi)容

保齡球計(jì)分系統(tǒng)c語言課程設(shè)計(jì)畢業(yè)設(shè)計(jì)word格式(文件)

2024-12-18 06:07 上一頁面

下一頁面
 

【正文】 ntf( Created by 熊宇堂 20201010122\n)。 printf( * * * * * * * * * * * * * * * \n)。 printf(\n)。 } void main() { int x,y,z。 printf(\n)。 } printf(總計(jì)得分 : )。 else if(a[9][0]+a[9][1]==10) if(a[10][0]==0) printf(|\n)。 else if(a[10][0]==10) if(a[10][1]==10) printf(||\n)。 else printf(%4d|%d,a[k][0],a[k][1])。 else 20 if(a[k][0]+a[k][1]==10) printf(%4d|/,a[k][0])。 for(k=0。i10。i++) { if(i==0) a[i][3]=a[i][2]。i=0。 else if(a[9][0]+a[9][1]==10) printf(|%d \n,a[k][0])。 for(k=0。i10。printf(\n)。 else if(p[n][0]+p[n][1]10) p[n][2]=p[n][0]+p[n][1]。 } void count(int p[ ][4],int n) { if(n==9) p[n][2]=p[n][0]+p[n][1]+p[n+1][0]+p[n+1][1]。 } for(i=0。 printf(請(qǐng)輸入要查詢的比賽局?jǐn)?shù): )。 int i。i++) fwrite(amp。 if((fp1=fopen(infile,wb+))==NULL) { printf(cannot open file\n)。 } } void save() { 18 FILE *fp1。 for(h=0。h=10。 } else m=1。 do { if( a[10][0]10 || a[10][0]0 ) { m=0。 } while(m==0)。 printf(錯(cuò)誤,請(qǐng)?jiān)俅屋斎?:)。 } else { printf(請(qǐng)輸入第十格第二次擊倒瓶數(shù) :)。 scanf(%d,amp。 scanf(%d,amp。a[10][0])。a[10][0])。 } else m=1。 do { if( a[9][0]10 || a[9][0]0 ) { m=0。 16 } while(m==0)。 printf(錯(cuò)誤,請(qǐng)?jiān)俅屋斎?:)。 printf(請(qǐng)輸入第 %d 格第二次擊倒瓶數(shù) :,i+1)。 scanf(%d,amp。 scanf(%d,amp。t)。 char ch,infile[15],outfile[15]。 15 6 附 錄 源代碼 include include struct game_number { int turn[11][2]。 13 選擇載入 這 個(gè) 文 件 , 要 查 詢 的 是 第 二 局 比 賽 的 數(shù) 據(jù) : 可以看到得到的是之前輸入的第 二局比賽的數(shù)據(jù),然后系統(tǒng)再次運(yùn)算得出了相同的積分結(jié)果。 else if(p[n][0]+p[n][1]10) p[n][2]=p[n][0]+p[n][1]。 void count(int p[ ][4],int n) /*定義形式參數(shù),方便已經(jīng)賦值的二維數(shù)組進(jìn)行計(jì) 算 */ { if(n==9) /*由于比賽規(guī)則特殊性,所以從第 9 格后的積分算法要專門判斷計(jì)算 */ p[n][2]=p[n][0]+p[n][1]+p[n+1][0]+p[n+1][1]。i=9。 scanf(%d,amp。 printf(請(qǐng)輸入讀取比賽數(shù)據(jù)的文件名: )。game[i],sizeof(struct game_number),1,fp1)。 return。 int i。 struct game_number { int turn[11][2]。 } while(m==0)。 printf(錯(cuò)誤,請(qǐng)?jiān)俅屋斎?:)。 if(a[9][0]+a[9][1]==10) { printf(請(qǐng)輸入追加一次擊倒瓶數(shù) :)。 scanf(%d,amp。 scanf(%d,amp。a[10][1])。a[10][1])。 } else m=1。 do { if( a[10][0]10 || a[10][0]0 ) { m=0。 } while(m==0)。 printf(錯(cuò) 誤,請(qǐng)?jiān)俅屋斎?:)。 /*用 if、 dowhile 來避免輸入錯(cuò)誤 */ } printf(請(qǐng)輸入第十格第一次擊倒瓶數(shù) :)。 scanf(%d,amp。 scanf(%d,amp。 /*定義兩個(gè)全局變量,分別用于進(jìn)行數(shù)據(jù)輸入以及計(jì)算和輸入選擇比賽局?jǐn)?shù) */ 模塊實(shí)現(xiàn) 1. 算法思想 用 for 循環(huán)來給數(shù)組賦值;用 if 以及 do while 語句同進(jìn)行,來進(jìn)行輸入判斷,避免輸入錯(cuò)誤 ; 在第十格用 if 語句判斷接下來的 擊球情況。 /*定義兩個(gè)字符數(shù)組,用來輸入存 儲(chǔ)以及讀取的文件名 */ struct game_number { int turn[11][2]。 輸出參數(shù): game[10].turn[11][2],結(jié)構(gòu)體,包含比賽數(shù)據(jù)以及每格所得分?jǐn)?shù)。 輸出參數(shù) : int a[11][4],已經(jīng)賦值了二維數(shù)組,包含比賽數(shù)據(jù)以及每格所得分?jǐn)?shù)以及總分。 Main(switch) Scan Read Print Save Count Print Count Changein Changeout 5 功 能: 按保齡球比賽規(guī)則計(jì)算比賽積分。 功 能: 將小于等于十局?jǐn)?shù)量的比賽數(shù)據(jù)存入自己命名的文件。 功 能: 提示輸入局?jǐn)?shù)以及每 格擊倒球數(shù),即輸入比賽數(shù)據(jù)。 5) Read: 讀取存儲(chǔ)了比賽數(shù)據(jù)的文件。 4 圖 保齡球計(jì)分系統(tǒng) 模塊結(jié)構(gòu)圖 1) Scan:初始化比賽,輸入比賽數(shù)據(jù) 。 顯示部分先定義 count 函數(shù)用來在得到比賽數(shù)據(jù)后進(jìn)行計(jì)算積分,然后一種顯示是輸入數(shù)據(jù)后直接計(jì)算 顯示;還有一種是讀取文件中比賽數(shù)據(jù),然后再進(jìn)行積分運(yùn)算,再顯示結(jié)果。 輸入數(shù)據(jù)要求 第一格第一次擊倒瓶數(shù):
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1