Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Find Largest/Smallest Number WITHOUT USING ARRAY

Minami_ShoMinami_Sho Posts: 3Member
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?

Comments

  • RoanneeeeRoanneeee Posts: 2Member
    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.