Write a PHP program to test if a given non-negative number is a multiple of 13 or it is one more than a multiple of 13.
<?php function test($n) { return $n % 13 == 0 || $n % 13 == 1; } var_dump(test(13)); var_dump(test(14)); var_dump(test(27)); var_dump(test(41));
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