Advertisement
mydul6938

Untitled

Sep 19th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.18 KB | None | 0 0
  1. <?php
  2.     $num=array(25,2,3,21,5,11);
  3.     for($j=2; $j<=$num; $j++)
  4.     {
  5.     for($k=2; $k<$j; $k++)
  6.     {
  7.     if($j%$k==0)
  8.     {
  9.     break;
  10.     }
  11.     }
  12.     if($k==$j)
  13.     echo "prime number:",$j,"<br>";
  14.  
  15.     }
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement