
Controls OpenTextBox
Controls ClearTextBox
FindPrimeNumbers

Stop

Variable Numeric number = 2
Variable Numeric divider
Variable Numeric isPrime

Label FindPrimeNumbers
	isPrime = 1
	
	For divider = 2 To Sqrt(number)
		If Mod(number, divider) = 0
			isPrime = 0
			Exit
		EndIf
	Next
	
	If number = 2 Or isPrime = 1
		Print number + " "
	EndIf
	
	number = number + 1
	
Goto FindPrimeNumbers


'BOOKMARKS 

'EDITEDLINES 0 10 11 10 6 10 17 10 22 10 27 10 

'WATCH Mod(number, divider)
'WATCH number
'WATCH divider
'EXEC K_Newton = 1.01
