Even or odd: Difference between revisions

Content added Content deleted
Line 3,718: Line 3,718:
To test oddity without caring of the data type :
To test oddity without caring of the data type :
≪ IF DUP TYPE THEN #1 AND #1 ≠ ELSE 2 MOD END ≫
≪ IF DUP TYPE THEN #1 AND #1 ≠ ELSE 2 MOD END ≫
{{in}}
<pre>
47 ODD?
#Fh BODD?
</pre>
{{out}}
<pre>
2: 1
1: 1
</pre>


=={{header|Ruby}}==
=={{header|Ruby}}==