Posted by: programmervb on: March 6, 2009
‘ look at a series of numbers and print out the prime numbers
‘ prime numbers are divisible only by unity or themselves
‘ this is BCX basic, a modern successor to Qbasic
Dim A ‘ defaults to integer
For A = 1 To 100
If IsPrime(A) Then Print A;
Next
Pause ‘ make console wait
Function IsPrime(Num)
Local X
‘ make exeptions for unity [...]