Hello -

This is a super simply question, but how do I compare two integers and return the smaller one’s value to a third variable? I’m struggling to get the syntax right.

Thanks!

Hello -

This is a super simply question, but how do I compare two integers and return the smaller one’s value to a third variable? I’m struggling to get the syntax right.

Thanks!

Use the following statement in an **Assign** activity:

**If(x<y, x, y)**

This will return the first value if the statement is true and the second one if the statement is false.