Archived

This topic is now archived and is closed to further replies.

aeleneski

i

Recommended Posts

Null and Void    1088
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!]

Share this post


Link to post
Share on other sites
Floppy    122
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

Share this post


Link to post
Share on other sites
conundrum07    122
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

Share this post


Link to post
Share on other sites
Peon    276
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)

Share this post


Link to post
Share on other sites
Null and Void    1088
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!]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites