コード例 #1
0
ファイル: Class 3.php プロジェクト: hwaunhwan/PHPIntermediate
<br>
<h2>Quiz</h2> //these things will be on the job interviews!!!!<br>

Write a funciton that accepts a number and retuns the string "even" if the number is even and "odd" otherwise.
<br>
<?php
function oddeven ($num) {
    if ($num % 2 ==0) {
        return "Even";
    } else {
        return "odd";
    }
}
echo oddeven (50) . "<br>";
echo oddeven (51);

?>
<br>
On Internet forums, sometimes people try to act tough by replacing letters with numbers. We call this "1337 speak" or "leet speak", short for "elite".


People usually make the following
"1" instead of "i" or "l"
"0" instead of "o"
"3" instead of "e"
"7" instead of "t"

write a function that accepts a string and returns it converted into its "leet speak" equivalent
<br>
<p>
コード例 #2
0
<?php

require 'util.php';
prof();
oddeven(2);