This is actually same like other programming language or lets try to find different ways to do it.
- First Method:
Logic: Compare two numbers and get the output then compare with the third number.
Using If condition inside single Assign Activity and it will provide us the output in a variable. Lets look at the If condition first, how it works:
If (Condition, True, False)Similarly if we want to use another if inside the first one, this is how we will use.
If (Condition, True, False)
If (Condition, If (Condition, True, False), False)
If (Condition, If (Condition, True, False), If (Condition, True, False))
Lets take three numbers of datatype Int, and assign the values
Then in output variable we declare the condition we defined above.
Output= If ( _No < second_No, if (first_No < third_No, first_No, third_No), if (second_No < third_No, second_No, third_No))
It will give you the least number, similarly if you change the sign greater than > then it will provide you the greater number in all three numbers.- Second Method:
This one is quite similar like first one, only we are going to use If activity but logic remains same.
Happy Automation.
Comments
Post a Comment