level 4
fun judge(num)
Jud=0
For i = 2 to num-1
If num%i=0 then h1=1
Next
If h1=0 then jud=1
Return jud
Fun end
Cls
Print " PRINT YISH"
Print "Please input the number."
Input a
Print "Judge the number is or not a prime..."
j=judge(a)
If j=1 then goto @last
Print a;"isn't a primer."
Print ""
Print a;"'s has these YISH:"
Print ""
@xun For i = 1 to a
If a%i=0 then fac2=a/i else break
Print a;"=";i;"*";fac2
If i=a then goto @end
Next
Goto @xun
@end End
@last print a;"is a prime."
Goto @end
2012年09月12日 22点09分
