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

正文內(nèi)容

c語(yǔ)言期末復(fù)習(xí)題(編輯修改稿)

2025-07-04 13:33 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 __ 。 }/**************found**************/ *n = ___2___ 。}main(){ int aa[1000], n, k 。/**************found**************/ fun ( ___3___ ) 。 for ( k = 0 。 k n 。 k++ ) if((k + 1) % 10 == 0) printf(\n) 。 else printf(%5d, aa[k]) 。}// :/**************found**************/ if(((i % 7 == 0) || (i % 11 == 0)) amp。amp。 i % 77 != 0) a[j++] = i 。/**************found**************/ *n = j 。/**************found**************/ fun ( aa, amp。n ) 。 給定程序的功能是計(jì)算scroe中m個(gè)人的平均成績(jī)aver,將低于aver的成績(jī)放在below中,通過(guò)函數(shù)名返回人數(shù)。 例如,當(dāng)score={10,20,30,40,50,60,70,80,90},m=9時(shí),函數(shù)返回的人數(shù)應(yīng)該是4,below={10,20,30,40}。 請(qǐng)?jiān)诔绦虻南聞澗€處填入正確的內(nèi)容并把下劃線刪除,使程序得出正確的結(jié)果。 注意:。不得增行或刪行,也不得更改程序的結(jié)構(gòu)!/************/include include int fun(int score[], int m, int below[]){ int i, j = 0 。 float aver = 。 for(i = 0 。 i m 。 i++) aver += score[i] 。 aver /= (float) m 。 for(i = 0 。 i m 。 i++)/**************found**************/ if(score[i] aver) below[j++] = ___1___ 。 return j 。}main(){ int i, n, below[9] 。 int score[9] = {10, 20, 30, 40, 50, 60, 70, 80, 90} 。/**************found**************/ n = fun(score, 9, ___2___) 。 printf( \nBelow the average score are: ) 。/**************found**************/ for (i = 0 。 i n 。 i++) printf(%d , ___3___) 。}// :/**************found**************/ if(score[i] aver) below[j++] = score[i] 。/**************found**************/ n = fun(score, 9, below) 。/**************found**************/ for (i = 0 。 i n 。 i++) printf(%d , below[i]) 。3給定程序的功能是求出能整除x且不是偶數(shù)的各整數(shù),并放在數(shù)組pp中,這些除數(shù)的個(gè)數(shù)由n返回。 例如,若x的值為30,則有4個(gè)數(shù)符合要求,它們是1,3,5,15。 請(qǐng)?jiān)诔绦虻南聞澗€處填入正確的內(nèi)容并把下劃線刪除,使程序得出正確的結(jié)果。 注意:。不得增行或刪行,也不得更改程序的結(jié)構(gòu)!/************/include void fun(int x, int pp[], int *n){ int i, j = 0 。 for(i = 1 。 i = x 。 i +=2 )/**************found**************/ if((x % i) == 0) pp[j++] = ___1___ 。/**************found**************/ *n = ___2___ 。}main(){ int x, aa[1000], n, i 。 printf( \nPlease enter an integer number:\n ) 。 scanf(%d, amp。x) 。/**************found**************/ fun(x, ___3___ ) 。 for( i = 0 。 i n 。 i++ ) printf(%d , aa[i]) 。 printf(\n) 。}// :/**************found**************/ if((x % i) == 0) pp[j++] = i 。/**************found**************/ *n = j 。/**************found**************/ fun(x, aa, amp。n ) 。3給定程序的功能是實(shí)現(xiàn)矩陣(3行3列)的轉(zhuǎn)置(即行列互換)。 例如,輸入下面的矩陣: 100 200 300 400 500 600 700 800 900 程序輸出: 100 400 700 200 500 800 300 600 900 請(qǐng)?jiān)诔绦虻南聞澗€處填入正確的內(nèi)容并把下劃線刪除,使程序得出正確的結(jié)果。 注意:。不得增行或刪行,也不得更改程序的結(jié)構(gòu)!/************/include int fun(int array[3][3]){ int i,j,arr[3][3] 。 memcpy(arr, array, 9*sizeof(int)) 。 for(i = 0 。 i 3 。 i++) for(j = 0 。 j 3 。 j++)/**************found**************/ array[i][j] = ___1___ 。}main(){ int i,j。 int array[3][3]={{100,200,300},{400,500,600},{700,800,900}}。 for (i=0。i3。i++) { for (j=0。j3。j++) printf(%7d,array[i][j])。 printf(\n)。 }/**************found**************/ fun(___2___)。 printf(Converted array:\n)。 for (i=0。i3。i++) { for (j=0。j3。j++)/**************found**************/ printf(%7d, ___3___)。 printf(\n)。 }}// :/**************found**************/ array[i][j] = arr[j][i] 。/**************found**************/ fun(array)。/**************found**************/ printf(%7d,array[i][j])。 3函數(shù)fun的功能是:統(tǒng)計(jì)長(zhǎng)整數(shù)n的各個(gè)位上出現(xiàn)數(shù)字3的次數(shù),并通過(guò)外部(全局)變量ccc3返回主函數(shù)。例如,當(dāng)n=123114350時(shí),結(jié)果應(yīng)該為:c1=3 c2=1 c3=2。 請(qǐng)?jiān)诔绦虻南聞澗€處填入正確的內(nèi)容并把下劃線刪除,使程序得出正確的結(jié)果。 注意:。不得增行或刪行,也不得更改程序的結(jié)構(gòu)!/************/include int c1,c2,c3。void fun(long n){ c1 = c2 = c3 = 0。 while (n) {/**********found**********/ switch(___1___) {/**********found**********/ case 1: c1++。___2___。/**********found**********/ case 2: c2++。___3___。 case 3: c3++。 } n /= 10。 }}main(){ long n=123114350L。 fun(n)。 printf(\nThe result :\n)。 printf(n=%ld c1=%d c2=%d c3=%d\n,n,c1,c2,c3)。}// :/**********found**********/ switch(n%10)/**********found**********/ case 1: c1++。break。/**********found**********/ case 2: c2++。break。3函數(shù)fun的功能是進(jìn)行字母轉(zhuǎn)換。若形參ch中是小寫英文字母,則轉(zhuǎn)換成對(duì)應(yīng)的大寫英文字母;若ch中是大寫英文字母,則轉(zhuǎn)換成對(duì)應(yīng)的小寫英文字母;若是其它字符則保持不變;并將轉(zhuǎn)換后的結(jié)果作為函數(shù)值返回。 請(qǐng)?jiān)诔绦虻南聞澗€處填入正確的內(nèi)容并把下劃線刪除,使程序得出正確的結(jié)果。 注意:。 不得增行或刪行,也不得更改程序的結(jié)構(gòu)! /************/include include char fun(char ch){/**********found**********/ if ((ch=39。a39。)___1___(ch=39。z39。)) return ch 39。a39。 + 39。A39。 if ( isupper(ch) )/**********found**********/ return ch +39。a39。___2___ 。/**********found**********/ return ___3___。}main(){ char c1, c2。 printf(\nThe result :\n)。 c1=39。w39。 c2 = fun(c1)。 printf(c1=%c c2=%c\n, c1, c2)。 c1=39。W39。 c2 = fun(c1)。 printf(c1=%c c2=%c\n, c1, c2)。 c1=39。839。 c2 = fun(c1)。 printf(c1=%c c2=%c\n, c1, c2)。}// :/**********found**********/ if ((ch=39。a39。) amp。amp。 (ch=39。z39。))/**********found**********/ return ch +39。a39。 39。A39。 。/**********found**********/ return ch。3函數(shù)fun的功能是:將形參a所指數(shù)組中的前半部分元素中的值和后半部分元素中的值對(duì)換。形參n中存放數(shù)組中數(shù)據(jù)的個(gè)數(shù),若n為奇數(shù),則中間的元素不動(dòng)。 例如:若a所指數(shù)組中的數(shù)據(jù)依次為:9,則調(diào)換后為:4。 請(qǐng)?jiān)诔绦虻南聞澗€處填入正確的內(nèi)容并把下劃線刪除,使程序得出正確的結(jié)果。 注意:。 不得增行或刪行,也不得更改程序的結(jié)構(gòu)!/************/include define N 9void fun(int a[], int n){ int i, t, p。/**********found**********/ p = (n%2==0)?n/2:n/2+___1___。 for (i=0。 in/2。 i++) { t=a[i]。/**********found**********/ a[i] = a[p+___2___]。/**********found**********/ ___3___ = t。 }}main(){ int b[N]={1,2,3,4,5,6,7,8,9}, i。 printf(\nThe original data :\n)。 f
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)教案相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1