Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. while (true) {
  2. int max = 0;
  3. int n= 0;
  4. for (int i = 0; i < 8; i++) {
  5. int mountainH = in.nextInt();
  6. if (mountainH > max) {
  7. max = mountainH;
  8. n = i;
  9. }
  10.  
  11.  
  12. System.out.println(n);
  13. max = 0;
  14. n= 0;
  15. }
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement