Computer Science, asked by roopladdi2567, 1 year ago

Images of php to generate first 20. Natural numbers

Answers

Answered by mrfawadali
0

For loop:

for($i = 1; $i<=20; $i++)

{

echo $i;

echo "<br>";

}

While loop:

while($i <= 20)

{

echo $i. '<br>';

$i = $i + 1;

}

Similar questions