Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

echo first 100 prime numbers php

<?php
for($i=1;$i<=100;$i++){
for($j = 1; $j<=$i; $j++){
 $temp = $i%$j;
 if($temp == 1){
 echo "is a prime number   ".$j."<br>";
 }
}
}
?>
Source by www.semicolonworld.com #
 
PREVIOUS NEXT
Tagged: #echo #prime #numbers #php
ADD COMMENT
Topic
Name
2+3 =