Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
4.A
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' // Razak-7051 import java.util.*; import java.lang.*; class Rextester{ public static void main(String[] args) { System.out.println("Enter Up To 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("Min number: " + min); System.out.println("Max number: " + max); } }
run
|
edit
|
history
|
help
0
Union of Arrays
Use of JS in Java (not my)
sfr
Random and count of even numbers (ver. 2)
Tree_inorder_recursive
Trapping Rain Water
Armstrong number
pattern of the day (code formatting fixed)
Borrowing class
Fgh