andrisp Posted April 28, 2005 Report Share Posted April 28, 2005 nju ? Link to comment Share on other sites More sharing options...
andrisp Posted April 28, 2005 Author Report Share Posted April 28, 2005 pats kautko atradu function OddOrEven($intNumber) { if ($intNumber % 2 == 0 ) { //paara return TRUE; } else { //Nepaara return FALSE; } } Link to comment Share on other sites More sharing options...
bubu Posted April 28, 2005 Report Share Posted April 28, 2005 Var smukāk: $isOdd = $intNumber&1; true(1) - ja nepāra, false(0) - ja pāra. Link to comment Share on other sites More sharing options...
Recommended Posts