0

How does one get the lowest number of multiple numbers

16th May 2017, 8:31 AM
Eugene Msipa
Eugene Msipa - avatar
2 odpowiedzi
+ 1
Many ways to do this. An easy way is //Add your numbers to an array int[] numbers={2,3,8,1}; //Sort them lowest to highest java.util.Arrays.sort(numbers); //Then first index is the smallest number System.out.println(numbers[0]);
16th May 2017, 9:59 AM
LordHill
LordHill - avatar