Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. if(scoresAmount == 15){
  2. int index=15;
  3. int lowScore = score;
  4. int i;
  5. for(i=0; i<15; i++){
  6. if(scoresArray[i] < lowScore){
  7. lowScore=scoresArray[i];
  8. index=i;
  9. }
  10. }
  11. if(index !=15){
  12. scoresArray[index] = score;
  13. names[index] = input;
  14. }
  15. }
  16.  
  17. else{
  18. scoresArray[scoresAmount] = score;
  19. names[scoresAmount] = input;
  20. scoresAmount++;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement