求大神解答
#include <stdio.h>
int main()
{
??? int score[]={67,98,75,63,82,79,81,91,66,84};
??? int i,j,t,aver;
??? int sum=0;
??? for(i=0;i<10;i++)
??? {
??????? sum+=score[i];
??????? aver=sum/10;
??? }
??? for(i=8;i>=0;i--)
??? {
??????? for(j=0;j<10;j++)
??????? {
??????????? if(score[j]<score[j+1])/* 這里有什么問(wèn)題嗎???為什么我打出來(lái)說(shuō)這里沒(méi)定義,又說(shuō)這里需要分號(hào)
??????????? {
??????????????? t=score[j];
??????????????? score[j]=score[j+1];
??????????????? score[j+1]=t;
??????????? }
??????? }
??? }
??? for(i=0;i<10;i++)
??? {
??????? printf("%d%d%d%d%d",sum,score[0],score[9],aver,score[i]);
??? }
??? return 0;
}
2019-11-24
if(score[j]<score[j+1])
括號(hào)是中文的??!老哥!