All pastes #332375 Raw Edit

Mine

public text v1 · immutable
#332375 ·published 2007-01-29 23:04 UTC
rendered paste body
<?
if ($_POST['count'] != ""){
 if (is_numeric($_POST['count'])){
  $time_start = microtime(1);
  $x = $_POST['count'];
  for($i=1;$i<=$x;$i++) { 
   $f=sqrt($i);
   for($z=1;$z<=$f;$z++) { 
    $y=$i%$z;
    if($y==0){
     $l++;
    }
    if($l>=2){
     break;
    }
   }
   if ($l<=1){ 
    echo "$i, ";
    $b++; 
   }
   $l=0;
  }
  $time_end = microtime(1);
  $time = $time_end - $time_start;
  echo "<br><b>[ Found first $x prime numbers in $time seconds ]</b>";
 }
 else
 {
  echo "<br><b>Please enter a number!</b>";
 }
}
?>