Guest User

Untitled

a guest
Jul 11th, 2019
524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. Scanner sc = new Scanner(System.in);
  6. int N = Integer.parseInt(sc.nextLine());
  7. int max =0;
  8. for (int i = 1; i <= N; i++) {
  9. int number = Integer.parseInt(sc.nextLine());
  10. if (number>max){
  11. max = number;
  12. }
  13. }
  14. System.out.println(max);
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment