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

  • برمجة بي اتش بي

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

الأجوبة

<?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)
هل كان المحتوى مفيد؟

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...