C++ programing- less than and

if I have ten int variables, what’s the best way to say “If a is greater than b-j, do this; if b is greater than a and c-j, do this” etc.

I was thinking maybe saying “if a>(b and c and d and e and f and g and h and i and j) {…}”, but I’m not sure if that would do what I want or if there’s a more efficient way. Thanks!

Xojo.Maths Max function may be what you looking for.

http://developer.xojo.com/xojo-math$Max

for the most part, yes, but I need to determine which of a set of variables is, at that point, the greatest. When I use the max function, it claims “macro ‘max’ passed xxx arguments, but takes just 2”

What do I do with that? Do I need to download xojo libraries and use Max (as opposed to global “max” )?

Put the variables in an array. Sort the array or loop through the array to find the max value.

[code]Dim a, b, c, d, e, f, g, h, i, j As Integer
a = 3
b = 7

Select Case Max(a, b, c, d, e, f, g, h, i, j)
Case a

Case b


End[/code]

@Eli Ott that looks like just what I want, how would I notate that in standard c++ programming?
Thanks

Wrong forum???

:stuck_out_tongue_winking_eye: