Created
July 8, 2022 20:06
-
-
Save modos/eb23b70959ca3dd1b26f2461464d0981 to your computer and use it in GitHub Desktop.
ماکزیمم
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static Scanner sc; | |
public static void main(String[] args) { | |
sc = new Scanner(System.in); | |
int n = sc.nextInt(); | |
int nn = 0; | |
int max = 0; | |
for (int i=1; i<=n; i++) { | |
nn = sc.nextInt(); | |
if(max < nn) | |
max = nn; | |
} | |
System.out.println(max); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment