Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
4a
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { System.out.println("Enter 10 Numbers"); Scanner sc=new Scanner(System.in); Integer[] numbers =new Integer[10]; for (int i=0;i<numbers.length;i++) { System.out.print("enter numbers["+i+"]:"); numbers[i]=sc.nextInt(); } int min = (int) Collections.min(Arrays.asList(numbers)); int max = (int) Collections.max(Arrays.asList(numbers)); System.out.println("\nMin number: " + min); System.out.println("\nMax number: " + max); } }
run
|
edit
|
history
|
help
0
overloading
Prime or Not
Combination Sum (Leetcode)
Elevator Sim
OurDate.java
test1
3.A
Chiper
Test
Coding Challenge - 04 (Perfect numbers)