Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class minNum {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n = Integer.parseInt(scanner.nextLine());
- int min = Integer.MAX_VALUE;
- while (n --> 0) {
- int num = Integer.parseInt(scanner.nextLine());
- if (num < min) {
- min = num;
- }
- }
- System.out.println(min);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement