Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,24 @@
' Semiprime
DECLARE FUNCTION Count% (BYVAL N%)
INPUT "Enter an integer: ", N%
IF Count%(N%) = 2 THEN
PRINT "It is a semiprime."
ELSE
PRINT "It is not a semiprime."
END IF
END
FUNCTION Count% (BYVAL N%)
N% = ABS(N%)
Result% = 0
IF N% >= 2 THEN
FOR Factor% = 2 TO N%
WHILE N% MOD Factor% = 0
Result% = Result% + 1
N% = N% \ Factor%
WEND
NEXT Factor%
END IF
Count% = Result%
END FUNCTION