Public Group

#### Archived

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

# i

This topic is 6064 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i [Edited by - aeleneski on April 24, 2006 11:23:31 PM]

##### Share on other sites
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 on other sites
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 on other sites
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 on other sites
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 on other sites
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 on other sites
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.

1. 1
Rutin
24
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 9
• 46
• 41
• 23
• 13
• ### Forum Statistics

• Total Topics
631749
• Total Posts
3002033
×