for (x=1;x<=score;x++){ for(j=x+1;j<=score;++j){ if(elem[x]<elem[j]){ a=elem[x]; elem[x]=elem[j]; elem[j]=a; } } printf("Player #%d: ",x); printf("%d ", elem[x]); }