Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import java.util.Arrays;
- public class minimumNum{
- public static void main(String[] args) {
- Scanner s = new Scanner(System.in);
- System.out.println("How many numbers do you want to check?");
- int n = s.nextInt();
- int[] num = new int[n];
- System.out.println("Type your numbers below:");
- for(int i = 0; i < n; i++){
- num[i] = s.nextInt();
- }
- Arrays.sort(num);
- System.out.println("The minimum is " + num[0]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement