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

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

各位幫忙看一下??!


#include <stdio.h>

int i,j;

int sortscore(int socre[])

{

? ? int temp;

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

? ? {

? ? ? ? for(j=i+1;j<10;j++)

? ? ? ? {

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

? ? ? ? ? ? ? ?temp=score[i];

? ? ? ? ? ? ? ?score[i]=score[j];

? ? ? ? ? ? ? ?socre[j]=temp;

? ? ? ? }

? ? ? ? return socre;

? ? }

}

int sumscore(int score[])

{

? ? for(i=;i<10;i++)

? ? {

? ? ? ? sum+=score[i];

? ? }

? ? return sum;

? ? printf("考試成績總分為:%d\n",sum);

}

int maxscore(int score[]){

? ? printf("最高分為:%d\n",score[N-1]);

}

int minscore(int score[]){

? ? printf("最低分為:%d\n",score[0]);

}

int avagerscore(int score[]){

? ? int avager;

? ? avager=sum/N;

? ? printf("平均分為:%d\n",avager);

}

int main()

{

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

? ? sortscore(score);

? ? sumscore(score);

? ? maxscore(score);

? ? minscore(score);

? ? avagerscore(score);

? ? printf("考試成績降序排序?yàn)?d\n",score[]);

? ? return 0;

}

hello.c:?In?function?'sortscore':
hello.c:10:16:?error:?'score'?undeclared?(first?use?in?this?function)
?????????????if(score[i]


正在回答

1 回答

有個地方?jīng)]寫上,https://img1.sycdn.imooc.com//5b4d9de300017ef701570101.jpg

而且,你的排序是從大到小,最大值和最小值出錯了

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

舉報

0/150
提交
取消
C語言入門
  • 參與學(xué)習(xí)       926986    人
  • 解答問題       21533    個

C語言入門視頻教程,帶你進(jìn)入編程世界的必修課-C語言

進(jìn)入課程

各位幫忙看一下!!

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

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

幫助反饋 APP下載

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

公眾號

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