Write a PHP program to check two given integers whether either of them is in the range 100..200 inclusive

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

Write a PHP program to check two given integers whether either of them is in the range 100..200 inclusive

الأجوبة

<?php
function test($x, $y) 
{
    return ($x >= 100 && $x <= 200) || ($y >= 100 && $y <= 200);
}

var_dump(test(100, 199));
var_dump(test(250, 300));
var_dump(test(105, 190));

Sample Output:

bool(true)
bool(false)
bool(true)
هل كان المحتوى مفيد؟

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

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