sandbox-php/PE1.php

15 lines
144 B
PHP
Raw Permalink Normal View History

2023-01-22 19:23:14 +01:00
<?php
$i = 0;
$sum = 0;
for ($i; $i < 1000; ++$i) {
if ($i % 3 == 0 or $i % 5 == 0) {
$sum = $sum + $i;
}
}
echo "\n" . $sum . "\n";
?>