Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. for (int i=0; i<4; i++) {
  2.     for (int j=0; j<4-i; j++)
  3.       if (highscores[j+1] < highscores[j]) {  /* compare the two neighbors */
  4.         tempint = highscores[j];         /* swap a[j] and a[j+1]      */
  5.         tempstring = nomes[j];
  6.         highscores[j] = highscores[j+1];
  7.         nomes[j] = nomes[j+1];
  8.         highscores[j+1] = tempint;
  9.         nomes[j+1] = tempstring;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement