Template:IsEven
Revision as of 09:46, 11 May 2011 by MarcBrugman (Talk | contribs) (Created page with "<includeonly>{{#vardefine: data|{{{1}}}}}{{#vardefine: dec|{{#expr:{{#var:data}}/2}} }}{{#vardefine:trunk|{{#expr:trunc{{#var:dec}}}} }}{{#ifeq:{{#var:dec}}|{{#var:trunk}}|true|}...")
Revision as of 09:46, 11 May 2011 by MarcBrugman (Talk | contribs) (Created page with "<includeonly>{{#vardefine: data|{{{1}}}}}{{#vardefine: dec|{{#expr:{{#var:data}}/2}} }}{{#vardefine:trunk|{{#expr:trunc{{#var:dec}}}} }}{{#ifeq:{{#var:dec}}|{{#var:trunk}}|true|}...")
Template to test if a number is even or not
Parameters :
the number to test return true if even, false if not
Exemple
{{IsEven|1}} returns {{IsEven|21}} returns {{IsEven|42}} returns true