[ create a new paste ] login | about

Link: http://codepad.org/ivoRxGFP    [ raw code | output | fork ]

PHP, pasted on Feb 23:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

function isPrimary($num){
    if ($num % 2 == 0 && $num % 3 == 0){
      return false;
    }

    return true
}

for($i=5;$i<=100;$i++){
   if (isPrimary($i)){
       echo "$i\n";
   }
}


Output:
1
2

Parse error: syntax error, unexpected '}' on line 9


Create a new paste based on this one


Comments: