joseleonweb

Untitled

Jan 19th, 2021
618
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for(int i=1; i < vector.length; i++)
  2.             for(int j=0; j < vector.length-1; j++) { // if out of order
  3.                 if (vector[j] > vector[j+1]) {
  4.                     // exchange elements
  5.                     aux = vector[j];
  6.                     vector[j] = vector[j+1];
  7.                     vector[j+1] = aux;
  8.                 }
  9.                
  10.             }
RAW Paste Data