Showing results for 
Search instead for 
Did you mean: 

Pair and Impair number ..

Former Member
0 Kudos


is there any method/formula to recognize pair and impair numbers in web Intelligence .. ? Thanks ..

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Selam,

I guess a bit of algebra should help there

let X the number you want to detect

if X is even then P exists so X=2P

if X is odd, then P exists so X=2P+1

translation into WebI formulas yields : EVEN(2P)=true ODD(2P)=false

you can otherwise rebuild it from scratch :

IF MOD(X,2)=1 THEN "Odd !" ELSE "Even !"

Hope that helps,