猿问

为什么float pjf;和pjf=zf/10;在c++一直出错,还是别的地方错了.

#include <stdio.h>

int main()

{

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

    int i,j,zf=0;

int max=0;

int min=999999;

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

{

zf=zf+score[i];

if(score[i]>max)

{

max=score[i];

}

if(score[i]<min)

{

min=score[i];

}

}

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

{

for(j=8;j>=i;j--)

{

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

{

int huan;

huan=score[j];

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

score[j+1]=huan;

}

}

}

float pjf;

pjf=zf/10;

printf("总分%d,最高分%d,最低分%d,平均分%f\n",zf,max,min,pjf);

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

{

printf("%d,",score[i]);

}

return 0;

}


湫来了
浏览 771回答 0
0回答

慕斯4360584

XQKLMJNCCLSTCMGNRKLCAUVBOTDHQKEFSEIOHDNQEPDXIVOIJUOBVADGFZGHUYDULPBUSTKDNKCMAPAXSCWGAUSFOXRBMTTRBKUMMHRSMTWNATXXKKEDSMHHVVXUFAQQEEPTWGQXYSGBSTDPJCHHFPTFQDUUCMHYYDWDACLSCGKYIZBNYHRJDHSYPYBCLVCTVQCDDBCWIWQRECMDRBOLIKISMVPTLBYZBJGUPJGILOPMTXRCWTHQRBQRVCMNUATGRSCDHBIWJXUVPDJGXYVCPWTVDHKBMZOYYIZKXBMWQZSGXXICWGHMKTDKYSLTDUUUNASTQZGBBPWLVUVCQDKVIQZUIWQAXICGKHJGNVIPAAIWDMAAEFMNHRHOEJCTNBBXAZMVTBVPDEEINNQUFZDTTKYNXURWOIHLVZXXABCDGUVFBRHULSTDHYIWSEWARIFUZTABHXJKKUGHOIKKXPQHKYPZFSERBLXKHGGNQFMTWRRYPJWIQJARROLSSCPMCCJDTBPZJRXDDHUUIWQVWSTDNYSFPWJYDPJAQHUFFTAJZWHYZMQPSUPGGQNAOOFSOAKLMNZMWHEMYXYIZJNNEATMQQHXYLCDQMSVKLZCZGXQKUEUVFDRLLIXGISJJUBIICDNWHHBVSMEEGHNSS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