第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

有兩個(gè)問題:1、想返回整個(gè)數(shù)組;2、為什么我現(xiàn)在這個(gè)代碼有返回值,但卻不是數(shù)組呢?幫幫忙

#include <stdio.h>

#define N 10

int totall(int score[]) ? //考試的總分

{

? ? int i,totall=0;

? ? for(i=0;i<N;i++)

{

? ? totall+=score[i];

}

return totall;

}

int Max(int score[])

{

? ? int i,max=0;

? ? for(i=0;i<N;i++)

{

? ? if(score[i]>max)

{

? ? max=score[i];

}

}

return max;

}

int Low(int score[])

{

? ? ?int i,min;

min=score[0];

for(i=0;i<N;i++)

{

? ? ?if(score[i]<min)

?min=score[i];

}

return min;

}

int average(int score[])

{

? ? ?int aver,sum;

sum=totall(score);

aver=sum/N;

return aver;

}

int sort(int score[])

{

?int i,j;

? ? ? for(i=8;i>=0;i--)

?for(j=0;j<=i;j++)

?{

?int temp;

? ? ?if(score[j]<score[j+1])

?{

? ? ? temp=score[j+1];

? score[j+1]=score[j];

? score[j]=temp;

?}

?}

?return score[N];

}

int main()

{

? ? int score[N]={67,98,75,63,82,79,81,91,66,84};

printf("總分是:%d\n",totall(score));

printf("最高分是:%d\n",Max(score));

printf("最低分是:%d\n",Low(score));

printf("平均分是:%d\n",average(score));

printf("考試成績(jī)降序排序:%d\n",sort(score));

? ? return 0;

}


正在回答

2 回答

百度上有返回?cái)?shù)組的教程,雖然我看了會(huì)兒還是沒怎么看懂。

http://blog.163.com/guan123long@126/blog/static/131337312200993095721539/

0 回復(fù) 有任何疑惑可以回復(fù)我~

再試試 ? 會(huì)解決的

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

補(bǔ)食者 提問者

牛逼??!
2016-02-17 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

有兩個(gè)問題:1、想返回整個(gè)數(shù)組;2、為什么我現(xiàn)在這個(gè)代碼有返回值,但卻不是數(shù)組呢?幫幫忙

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)