🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

i

Started by
5 comments, last by aeleneski 22 years, 6 months ago
i [Edited by - aeleneski on April 24, 2006 11:23:31 PM]
Advertisement
Set the lowest to the first number (index 0). Scan through the indices 1 to the maximum index (a loop: for, while, whatever you want), if the current number if lower than the saved one, overwrite the saved one with the current. When the loop is done, the saved one is the lowest. Repeat for highest.

Now, how hard is that really?

[Resist Windows XP''s Invasive Production Activation Technology!]
I notice you crossed post with here and this other one.

I don't know if you realize that it is improper etiquette to post the same question in multiple forums.

I also don't know if you realize that it is improper etiquette to post homework questions; let alone in multiple forums.

I also also don't know if you realize that it is improper etiquette to not learn through experience.

I also also also hope I guided you in the right direction for future posting on www.GameDev.net and the etiquette that is involved.

It's also also also also not proper etiquette to constantly use also (edit: or etiquette ) in consecutive sentences, or words.

Good Luck!



Edited by - Floppy on December 10, 2001 7:02:01 PM

Edited by - Floppy on December 10, 2001 7:02:45 PM
Actually its easier to keep track of those things as you get the numbers, that way you don't have to store the data in an array. Just have 2 vars, one for low and one for high. Set them both to the first inputted data. Or you could set them both to large numbers (ie. set the high var to like -10000, that way the firs will be larger) While you are inputting, do a simple < or > comparison.

"cogito, ergo sum" -Descartes

Edited by - conundrum07 on December 10, 2001 7:12:00 PM
"cogito, ergo sum" -Descartes
No offense, but it''s pretty obvious when people are asking question for homework and when it''s this easy, you should really try and do it yourself (you learn more that way)
Peon
quote: Original post by Peon
No offense, but it''s pretty obvious when people are asking question for homework and when it''s this easy, you should really try and do it yourself (you learn more that way)

That''s exactly why I won''t post any code for these types of questions .

[Resist Windows XP''s Invasive Production Activation Technology!]
quote: Original post by conundrum07
Actually its easier to keep track of those things as you get the numbers, that way you don''t have to store the data in an array. Just have 2 vars, one for low and one for high. Set them both to the first inputted data.


Agreed this works better.

quote: Or you could set them both to large numbers (ie. set the high var to like -10000, that way the firs will be larger) While you are inputting, do a simple < or > comparison.

"cogito, ergo sum" -Descartes

Edited by - conundrum07 on December 10, 2001 7:12:00 PM


U dont ever want to do things like that imo. I feel its very bad programming assuming users will not do something. U want to make sure users cant do something instead.

This topic is closed to new replies.

Advertisement