...
This commit is contained in:
parent
051504d65b
commit
0457928c3e
295 changed files with 3588 additions and 3 deletions
12
Task/Arithmetic-Integer/PHP/arithmetic-integer.php
Normal file
12
Task/Arithmetic-Integer/PHP/arithmetic-integer.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
$a = fgets(STDIN);
|
||||
$b = fgets(STDIN);
|
||||
|
||||
echo
|
||||
"sum: ", $a + $b, "\n",
|
||||
"difference: ", $a - $b, "\n",
|
||||
"product: ", $a * $b, "\n",
|
||||
"truncating quotient: ", (int)($a / $b), "\n",
|
||||
"flooring quotient: ", floor($a / $b), "\n",
|
||||
"remainder: ", $a % $b, "\n";
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue