Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Opdracht 1.B
- /*
- $tafel1 = 4;
- $tafel2 = 5;
- for($x = 0; $x < 10; $x++) {
- $result1 = $tafel1 * $x;
- $result2 = $tafel2 * $x;
- echo $x . " x " . $tafel1 . " = " . $result1 . "    " . $x . " x " . $tafel2 . " = " . $result2 . "<br>";
- }
- */
- // Opdracht 2 NIET KLAAR
- $maanden = 12;
- $bedragMaand = 50;
- for($jaar = 1; $jaar <= 10; $jaar++) {
- $totaalBedrag = ($jaar * $maanden) * $bedragMaand;
- $rente = ($bedragMaand / 100 * 4) * $jaar;
- echo "Jaar: $jaar, totaal: $totaalBedrag, ontvangen rente: $rente <br>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement