13 lines
261 B
GLSL
13 lines
261 B
GLSL
$inc fvmstd.fp
|
|
|
|
proc main
|
|
:getuint @x
|
|
2 @checkFact
|
|
while &checkFact &checkFact u* 1 u- &x u< do
|
|
if &x &checkFact u% 0 == then
|
|
"Not Prime" :puts :newline return
|
|
endif
|
|
&checkFact 1 u+ @checkFact
|
|
endwhile
|
|
"Prime" :puts :newline
|
|
endproc
|