View Full Version : get minimum and maximum number
02-06-2005, 11:02 AM
if I have variables age1,age2,age3,age4,age5, and age6
How would I get the minimum and maximum age?
02-07-2005, 09:51 AM
id put them in an array, loop through them and run 1 ifs inside
intMin = 0
intMax = 0
ages = Array(.., .., .., .., .., ..)
if ages(i) < intMin Then intMin = ages(i)
if ages(i) > intMax Then intMax = ages(i)
sry i couldnt write it all im in a bit of a rush :p
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.