Question : Sorting number excluding elements in highest to lowest
Answered by : amauna
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\n", elem[x]); }
Source : https://app.codechum.com/student/review/48369/question/3 | Last Update : Fri, 18 Mar 22