Write a PHP program to check if one given temperatures is less than 0 and the other is greater than 100
- برمجة بي اتش بي
- 2021-09-08
- mhanasmh00489829403
الأجوبة
<?php
function test($temp1, $temp2)
{
return $temp1 < 0 && $temp2 > 100 || $temp2 < 0 && $temp1 > 100;
}
var_dump(test(120, -1));
var_dump(test(-1, 120));
var_dump(test(2, 120));
Sample Output:
bool(true) bool(true) bool(false)
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال