How to judge even/odd numbers.(Power Automate Desktop)
This section shows how to judge even and odd numbers.
Overall flow
Robin(for copy and paste)
It can be copied and pasted into Power Automate Desktop.
SET Num TO 5 IF Num = 0 THEN # %Num% is even. ELSE # %Num% is odd. END
Steps
It uses the fact that when a number is divided by 2, if the remainder is 0, it is an even number, and if the remainder is 1, it is an odd number.
Put in place an "If" and an "Else".The "If" is set up as follows.
The name of the numerical variable to be judged is arbitrary, but it is assumed to be %Num%.
"mod" is an operator that performs division and obtains the remainder.
Parameter | Value |
---|---|
First operand | %Num mod 2% |
Operator | Equal to (=) |
Second operand | 0 |
If the result of "If" is true, it is even; if false, it is odd.
If the "Second operand" is set to 1, then the even/odd decision is reversed.
For those who want to learn Power Automate Desktop effectively
The information on this site is now available in an easy-to-read e-book format.
Or Kindle Unlimited (unlimited reading).
You willl discover how to about basic operations.
By the end of this book, you will be equipped with the knowledge you need to use Power Automate Desktop to streamline your workflow.
Discussion
New Comments
No comments yet. Be the first one!