Write a PHP program to check if a given positive number is a multiple of 3 or a multiple of 7
<?php function test($n) { return $n % 3 == 0 || $n % 7 == 0; } var_dump(test(3)); var_dump(test(14)); var_dump(test(12)); var_dump(test(37));
Sample Output:
bool(true) bool(true) bool(true) bool(false)
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer