View Single Post
Old 02-18-2006, 08:41 PM   #1 (permalink)
jamie7823
 
Junior Techie

Join Date: Sep 2005

Posts: 61

jamie7823

Default V.B 6.0: Comparing multiple integers

I just bought a visual basic 6 book. This will be my very first language.

Im in ch 3 of he book and it gives an exercise and wants me to make a script to compare 3 random integers and make it print the smallest and largest of the 3.

X is the largest number of the 3.
y is the smallest of the 3.


is there some way i can compare 1 integer to a list?

this is what i had in mind....

If X>(y,z) then
X=largest
End If

If Y> (x,z) then
Y=largest
End If

If Z>(x,y) then
Z=largest

End If

If X<(y,z) then
X=smallest
End If

If Y< (x,z) then
Y=smallest
End If

If Z<(x,y) then
Z=smallest
End If


Print largest ,"is the largest of the 3 numbers."
Print smallest, " is the smallest of the 3 numbers."


Im aware that my print statement may be out of wack but I'd like to concentrate on the comparisons.

Thank you
__________________
Dell Dimension 3000, Win 2000 pro, BEFW11S4 Linksys router.
jamie7823 is offline