...

View Full Version : get minimum and maximum number



esthera
02-06-2005, 10:02 AM
if I have variables age1,age2,age3,age4,age5, and age6

How would I get the minimum and maximum age?

ghell
02-07-2005, 08:51 AM
id put them in an array, loop through them and run 1 ifs inside
intMin = 0
intMax = 0
ages = Array(.., .., .., .., .., ..)
for...
if ages(i) < intMin Then intMin = ages(i)
if ages(i) > intMax Then intMax = ages(i)
next


sry i couldnt write it all im in a bit of a rush :p



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum