Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int N = Integer.parseInt(sc.nextLine());
- int max =0;
- for (int i = 1; i <= N; i++) {
- int number = Integer.parseInt(sc.nextLine());
- if (number>max){
- max = number;
- }
- }
- System.out.println(max);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment