Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $a = 0;
- $b = 2;
- while($a < 1000){
- $last_digit = substr($b, -1);
- $me_prime = array(0,2,4,5,6,8);
- //echo $last_digit;
- if ( ($b==2) || (!in_array($last_digit, $me_prime)) || (sqrt($b) != floor(sqrt($b))) || (!($b%2) == 0) )
- {
- echo "$a = $b<br>";
- $a++;
- $b++;
- }else {
- $a = $a;
- $b++;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement