Q:

Write a PHP program to check if y is greater than x, and z is greater than y from three given integers x,y,z

0

Write a PHP program to check if y is greater than x, and z is greater than y from three given integers x,y,z

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

<?php
function test($x, $y, $z)
{
   return $x < $y && $y < $z;
}

var_dump(test(1, 2, 3))."\n";
var_dump(test(4, 5, 6))."\n";
var_dump(test(-1, 1, 0))."\n";

Sample Output:

bool(true)
bool(true)
bool(false)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now