Share with your friends
Call

Solution: To find the multiple of 3 or 5 simply write and run the following code

let variables be  $sum = 0, $n

<?php
$sum = 0;
for ($n = 0; $n < 1000; $n++) 
{
 if (!($n % 5) || !($n % 3)) 
   {
     $sum += $n;
   }
 }
echo $sum;
?>

Talk Doctor Online in Bissoy App