And, to prove the speed of this code, try this. It's quite fun!
Graphics 500,700,1,2 For n = 0 To 200000 If Prime(n) = 1 Print n EndIf Next WaitKey() Function Prime(prime%) Local Not_Primes% ; If the givin number is prime Ex: 5 ; then it will not divide evenly by anything between 2 and the square root of five For divide = 2 To Sqr(prime) If prime Mod divide = 0 Return False EndIf Next Return True End Function