l204/H6.php

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>kwadraat</title> </head> <body> <?php for ($i = 1; $i <= 10; $i++) { $kwadraat = $i * $i; echo "<div>Het kwadraat van $i is $kwadraat<div>"; } $i = 1; while ($i <= 10) { $kwadraat = $i * $i; echo "<div>Het kwadraat van $i is $kwadraat<div>"; $i++; } for ($i = 20; $i >= 2; $i -= 2) { $kwadraat = $i * $i; echo "<div>Het kwadraat van $i is $kwadraat<div>"; } ?> </body> </html>

Resultaat

Made by Thijs Aarnoudse