Help for this page

Select Code to Download


  1. or download this
    # ...
    $res = 0;
    ...
    print "$number1 is ". ( ($result==0) ? 'equal to' :
                            ($result <0) ? 'less than' :
                                           'greater than' ) ." $number2\n"
    +;
    
  2. or download this
    print "$number1 is ".
            ('equal to', 'greater than', 'less than')[$result]
            ." $number2\n";