FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
smallbasic.github.io/samples/node/114.bas at master · smallbasic/smallbasic.github.io · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
smallbasic
/
smallbasic.github.io
Public
Notifications
You must be signed in to change notification settings
Fork
4
Star
4
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
smallbasic.github.io
/
samples
/
node
/
114.bas
Copy path
More file actions
More file actions
Latest commit
History
History
History
44 lines (42 loc) · 591 Bytes
Breadcrumbs
smallbasic.github.io
/
samples
/
node
/
114.bas
Copy path
File metadata and controls
44 lines (42 loc) · 591 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
'
#sec:Main
REPEAT
INPUT
x
IF
x
=
0
THEN
EXIT
LOOP
ENDIF
x0
=
x
f
=
2
p
=
0
WHILE
x
>
1
q
=
x
/
f
IF
q
=
INT
(
q
)
THEN
p
=
p
+
1
x
=
q
ELSE
IF
p
>
0
THEN
SHOWFACTOR f,
p
,
1
p
=
0
ENDIF
f
=
f
+
1
+ (
f
>
2
)
IF
f
>
SQR
(
x
)
THEN
f
=
x
ENDIF
ENDIF
WEND
IF
f
=
x0
THEN
PRINT
"
Prime
"
ELSE
SHOWFACTOR f,
p
,
0
PRINT
ENDIF
UNTIL
PI
=
22
/
7
END
SUB
SHOWFACTOR
(
f,p,d
)
PRINT
f;
IF
p
<>
1
THEN
PRINT
CAT
(
90
);p;
CAT
(
80
);
ENDIF
IF
d
THEN
PRINT
"
"
;
CHR
$(
183
);
"
"
;
ENDIF
END
'
Back
|
FazBrowse Home
|
New Git URL