Пример #1
0
<?php

require_once "Rechner.class.php";
$calc = new Rechner();
for ($i = 0; $i <= 10; $i++) {
    echo "{$i} + {$i} = " . $calc->add($i) . "<br>";
    echo "{$i} * {$i} = " . $calc->mul($i) . "<br>";
    echo "{$i}! = " . $calc->fak($i) . "<br>";
    echo "<hr>";
}
Пример #2
0
<?php

require_once "Rechner.class.php";
$y = new Rechner();
if (isset($_GET["zahl"])) {
    $l = $_GET["zahl"];
} else {
    $l = 10;
}
for ($i = 0; $i <= $l; $i++) {
    echo "{$i} + {$i} = " . $y->add($i) . "<br/>";
    echo "{$i} * {$i} = " . $y->mult($i) . "<br/>";
    echo "{$i}! = " . $y->fak($i) . "<br/><hr/>";
}