ΠΡΠΈ ΠΏΡΠΎΠ²Π΅ΡΠΊΠ΅ Π½Π΅ ΠΏΡΠΎΡ
ΠΎΠ΄ΠΈΡ ΠΏΠΎ ΠΏΠ΅ΡΠ²ΠΎΠΌΡ ΡΡΠ»ΠΎΠ²ΠΈΡ( ΡΡΠΎ Π½Π΅ ΡΠ°ΠΊ?
package com.javarush.task.pro.task05.task0507;
import java.util.Scanner;
/*
ΠΠ°ΠΊΡΠΈΠΌΠ°Π»ΡΠ½ΠΎΠ΅ ΠΈΠ· N ΡΠΈΡΠ΅Π»
*/
public class Solution {
public static int[] array;
public static void main(String[] args) throws Exception {
Scanner console = new Scanner(System.in);
int N = console.nextInt();
int[] array = new int[N];
for (int i = 0; i < N; i++) {
array[i] = console.nextInt();
}
int max = array[0];
for (int i = 1; i < array.length; i++) {
int number = array[i];
if (number >max) {
max = number;
}
}
System.out.println(max);
//Π½Π°ΠΏΠΈΡΠΈΡΠ΅ ΡΡΡ Π²Π°Ρ ΠΊΠΎΠ΄
}
}