How to find the greatest and smallest number in an array of numbers??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to find the greatest and smallest number in an array of numbers???

7th Feb 2017, 6:28 PM
Gopal Krishna Mishra
Gopal Krishna Mishra - avatar
1 Answer
0
Step one: sort the array (hint: bubble sort, one of the easiest) The first number is smallest, last is greatest.
7th Feb 2017, 6:59 PM
Ladislav Milunović
Ladislav Milunović - avatar