Find Largest/Smallest Number WITHOUT USING ARRAY

Hi, I was given a question about finding largest/smallest number of 10 numbers [b][u]WITHOUT USING ARRAY[/u][/b].

I usually do this kind of question using array but this question does not require array in it.

Any hints or ways to do that?


  • Umm.. You could do some sort of loop, with a value used inside of the loop (to store the largest number) which would go through each of the numbers, check if it is larger, then store it in the value if it is. Then you could just assign that value to whatever you want. I mean, that's how I would of done it normally, how would you do it with arrays?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion