Semiprime: Difference between revisions
Content deleted Content added
m →{{header|Tiny BASIC}}: -tidy |
add gw basic |
||
Line 969:
1680 -> false
</pre>
=={{header|GW-BASIC}}==
<lang gwbasic>10 INPUT "Enter a number: ", N
20 N=ABS(N)
30 C = 0
40 IF N < 3 THEN GOTO 80
50 F = 2
60 IF N MOD F = 0 THEN C = C + 1 : N = N / F ELSE F = F + 1
70 IF N > 1 THEN GOTO 60
80 IF C=2 THEN PRINT "It's a semiprime." ELSE PRINT "It is not a semiprime."</lang>
=={{header|Haskell}}==
|