Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4
The easiest way would be to use array. Store the numbers in the array, sort the array, and then just pick the first and last array element, that's it! Go give it a try, if you run into problems then share your code link so people can assist you! 👍 (Edit) The OP had created another thread which asks for hints on how to do this without any use of array.
5th Mar 2020, 7:28 AM
Ipang