Guest User

Untitled

a guest
Jun 23rd, 2011
1,292
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var a = [];
  2.  
  3. for (var i = 3; i <= 200000; i += 2) {
  4.    simple = true;
  5.    
  6.    for (var j = 0; j < a.length; j++) {
  7.        if (i % a[j] == 0) {
  8.            simple = false;
  9.            break;
  10.        }
  11.    }
  12.    
  13.    if (simple) a.push(i)
  14. }
  15.  
  16. print(a);
RAW Paste Data