sandbox-php/PE1.php
2023-01-22 13:23:14 -05:00

15 lines
144 B
PHP

<?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";
?>