Skip to content

Instantly share code, notes, and snippets.

@elct9620
Created November 7, 2011 15:14
Show Gist options
  • Save elct9620/1345250 to your computer and use it in GitHub Desktop.
Save elct9620/1345250 to your computer and use it in GitHub Desktop.
C++ sort array
void descArray(int *arr, int size){
int temp;
int loopRun = floor(size/2);
for(int i = 0; i < loopRun; i++){
temp = arr[size - i];
arr[size - i] = arr[i];
arr[i] = temp;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment