Help for this page

Select Code to Download


  1. or download this
    if ( $num == abs($num) ) {
        print "positive";
    } else {
        print "negative";
    }
    
  2. or download this
    if ( $num % 2 ) {
        print "odd";
    } else {
        print "even";
    }