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