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

正文內(nèi)容

c語(yǔ)言課后習(xí)題答案-文庫(kù)吧資料

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

【正文】 i++) { for (j=0? jcol? j++) { *(*(at+j)+i) = *(*(a+i)+j)? } } } void InputMatrix(int (*s)[COL], int row, int col) /*輸入矩陣元素*/ { int i, j? for (i=0? irow? i++) { for (j=0? jcol? j++) { scanf(%d, *(s+i)+j)? /*這里*(s+i)+j 等價(jià)于amp。minPos)? /* 找最小值及其所在下標(biāo)位置 */ printf(Max=%d, Position=%d, Min=%d, Position=%d\n, maxValue, maxPos, minValue, minPos)? } /*函數(shù)功能:求 n個(gè)數(shù)中的最大值及其所在下標(biāo)位置 函數(shù)入口參數(shù):整型數(shù)組 num,存儲(chǔ) n個(gè)整數(shù),整型變量 n,表示數(shù)組元素個(gè)數(shù) 函數(shù)出口參數(shù):整型指針變量 pMaxPos,指向的地址單元存儲(chǔ)最大值在數(shù)組中的下標(biāo)位置 函數(shù)返回值: 最大值*/ int FindMax(int num[], int n, int *pMaxPos) { int i, max? max = num[0]? /*假設(shè) num[0]為最大*/ *pMaxPos = 0? /*假設(shè)最大值在數(shù)組中的下標(biāo)位置為 0 */ for (i = 1? i n? i++) { if (num[i] max) { max = num[i]? *pMaxPos = i? } } return max ? } /*函數(shù)功能: 求 n個(gè)數(shù)中的最小值及其所在下標(biāo)位置 函數(shù)入口參數(shù): 整型數(shù)組 num,存儲(chǔ) n個(gè)整數(shù),整型變量 n,表示數(shù)組元素個(gè)數(shù) 函數(shù)出口參數(shù): 整型指針變量 pMinPos,指向的地址單元存儲(chǔ)最小值在數(shù)組中的下標(biāo)位置 函數(shù)返回值: 最小值*/ int FindMin(int num[], int n, int *pMinPos) { int i, min? min = num[0]? /*假設(shè) num[0]為最小*/ *pMinPos = 0? /*假設(shè)最小值在數(shù)組中的下標(biāo)位置為 0 */ for (i = 1?i 10?i++) { if (num[i] min) { min = num[i]? *pMinPos = i? } } return min ? } 3. 將 5 個(gè)字符串從小到大排序后輸出。num[i])? /* 輸入 10 個(gè)數(shù)*/ } maxValue = FindMax(num, 10, amp。 include include void Inverse(char *pStr)? main() { char str[80]? printf(Input a string:\n)? gets(str)? /*輸入字符串*/ Inverse(str)? /*將存于 str 數(shù)組中的字符串逆序存放*/ printf(The inversed string is:\n)? puts(str)? /*輸出字符串*/ } /*函數(shù)功能: 實(shí)現(xiàn)字符串逆序存放 函數(shù)參數(shù): 字符指針變量,所指向的存儲(chǔ)單元存放源字符串,逆序后的字符串也存放于此 返回值: 無(wú)*/ void Inverse(char *pStr) { int len? char temp? char *pStart? /*指針變量 pStart 指向字符串的第一個(gè)字符*/ char *pEnd? /*指針變量 pEnd指向字符串的最后一個(gè)字符*/ len = strlen(pStr)? /*求出字符串長(zhǎng)度*/ for (pStart=pStr,pEnd=pStr+len?1? pStartpEnd? pStart++,pEnd??) { temp = *pStart? *pStart = *pEnd? *pEnd = temp? } } 10 個(gè)整數(shù),用函數(shù)編程實(shí)現(xiàn)計(jì)算最大值和最小值,并返回它們所在數(shù)組 中的位置。 } 第八章 習(xí)題答案 一、選擇題 1?5 A B C C B 6?10 D A C B B 11?15 D A C C C 二、填空題 1. (1)* (2) amp。i11。 } if (i=10) a[10]=n。 break。 j) a[j]=a[j1]。 while (i10) { if (na[i]) { for (j=10。n)。 int i,j,n。 printf(max=%d\n,max)。j4。i3。 max=a[0][0]。 j++) scanf(%d,amp。 i++) for (j=0。 for (i=0。 } printf(s=%d\t count=%d\n,s,count)。 s+=a[i]。 i20。a[i])。 i20。 s=count=0。 printf(%d,gongyue(i,j))。} return(a)。a=b。 b=num2。num2=temp。 if(num1 num2) {temp=num1。 else printf(0)。 } void main() {int i=11。 break。ia1。 }第六章 習(xí)題答案 一、選擇題 1~5:CBABD 6~10:CDBCD 二、填空題 庫(kù)函數(shù)(或系統(tǒng)函數(shù)) ,自定義函數(shù) 無(wú)參函數(shù), 有參函數(shù) 傳值方式 實(shí)參, 形參 1 3 max is 2 15 1,2,3 三、編程題 參考答案: include int is_prime( int a) { int i,p=1。 b=t。 t=a。n=number。
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1