Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

Sorting number excluding elements in highest to lowest

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]);
    
  }
Source by app.codechum.com #
 
PREVIOUS NEXT
Tagged: #Sorting #number #excluding #elements #highest #lowest
ADD COMMENT
Topic
Name
9+9 =