Skip to main content
Question

How to validate if number is pair or odd?

  • Feb 18, 2019 12:22 PM UTC
  • 2 replies
  • 294 views

mr_fme
Enthusiast
Forum|alt.badge.img+9

Hi,

 

I need to validade if the sum of the numbers is pair or odd.

 

How to make this?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

lau
Forum|alt.badge.img+3
  • Feb 18, 2019 12:34 PM UTC

You can use a Tester with this test:

@Value(_your_number)%2 = 0:

Passed: even numbers

Failed: odd numbers


  • Nov 12, 2021 1:32 PM UTC

use this syntax with version 2021.1 : @fmod(@Value(_your_number),2)