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

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

略難....

#include <stdio.h> ? ?


int a()

{

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

????int i ;

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

????{

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

????}

????printf("本次考試總分為:%d\n\n本次考試平均分為:%d\n\n", score[9] , score[9] / 10 ) ;

????return 0 ;


}


int b()

{

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

????int j , max ;

????max = score[0] ;

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

????{

????if(score[j] > max)

????{

????max = score[j] ;

????}

????}

????printf("本次考試最高分為:%d\n\n" , max ) ;

????return 0 ;


}


int c()

{

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

????int k , min ;

????min = score[0] ;

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

????{

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

????{

????min = score[k] ;

????}

????}

????printf("本次考試最低分為%d\n\n" , min) ;

????return 0 ;


}


int d()

{

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

????int x , y , z ;

????for(x = 0 ; x < 9 ; x++)

????{

????for(y = 0 ; y < 9 - x ; y++ )

????if(score[y] > score[y + 1])

????{

????z = score[y] ;

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

????score[y + 1] = z ;

????}

????}

????printf("考試成績降序如下:\n") ;

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

????{

????printf("%d " , score[y] ) ;?

????}

????printf("\n\n") ;

????return 0 ;


}


int main()

{

????a() ;

????b() ;

????c() ;

????d() ;

}





正在回答

1 回答

#include <stdio.h> ? ?


int a()

{

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

int i ;

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

{

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

}

printf("本次考試總分為:%d\n\n本次考試平均分為:%d\n\n", score[9] , score[9] / 10 ) ;

return 0 ;

}


int b()

{

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

int j , max ;

max = score[0] ;

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

{

if(score[j] > max)

{

max = score[j] ;

}

}

printf("本次考試最高分為:%d\n\n" , max ) ;

return 0 ;

}


int c()

{

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

int k , min ;

min = score[0] ;

for(k = 0 ; k < 10 ; k++ )

{

if(score[k] < min )

{

min = score[k] ;

}

}

printf("本次考試最低分為%d\n\n" , min) ;

return 0 ;

}


int d()

{

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

int x , y , z ;

for(x = 0 ; x < 9 ; x++)

{

for(y = 0 ; y < 9 - x ; y++ )

if(score[y] > score[y + 1])

{

z = score[y] ;

score[y] = score[y + 1] ;

score[y + 1] = z ;

}

}

printf("考試成績降序如下:\n") ;

for(y = 9 ; y > 0 ; y-- )

{

printf("%d " , score[y] ) ;?

}

printf("\n\n") ;

return 0 ;

}



int main()

{

a() ;

b() ;

c() ;

d() ;

}




沒注意是降序,這個才是降序,前面的是升序!

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

舉報

0/150
提交
取消
C語言入門
  • 參與學習       926902    人
  • 解答問題       21532    個

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

進入課程
微信客服

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

幫助反饋 APP下載

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

公眾號

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