0

can i have a good sudgestion to you guys. for those who have knowledege in java..i dont know how to start it

the situation is.. the user need to input numbers10 times... and the program must show the lowest values in those 10 inputs. pls help..

25th Sep 2019, 6:02 AM
ryan aivan belotindos
ryan aivan belotindos - avatar
3 Answers
+ 1
store the inputs in an array then implement bubble sort then return the first value after the sort .....array[0]
25th Sep 2019, 6:11 AM
LODEKI BRIAN
LODEKI BRIAN - avatar
0
i think thats the bes way, but im just a newbie in java.. i dont know what you said, i only know in java is. the if condition, the loops, the and switch statement... i still dont kniw how to use arrays.
25th Sep 2019, 6:39 AM
ryan aivan belotindos
ryan aivan belotindos - avatar
0
Lesson about arrays: https://www.sololearn.com/learn/Java/2148/?ref=app Initialize an int array: int[] arr = new int[10]; This creates an array with size 10. The index starts at 0 and at 9 (arr.length - 1). With a for loop fill the array: for(int i = 0; i < arr.length; i++){ arr[i] = input; } Read the lesson about user input. https://www.sololearn.com/learn/Java/2220/ You can also create an array like this: int[] arr = {1,2,3,4,5,6,7,8,9,10}; With a for loop search for the lowest value.
25th Sep 2019, 9:09 AM
Denise Roßberg
Denise Roßberg - avatar