projects
/
pdp8.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
A large commit.
[pdp8.git]
/
sw
/
src
/
pascal
/
PRIMF.PS
1
PROGRAM PRIM(INPUT,OUTPUT);
2
VAR N,P: INTEGER;
3
BEGIN
4
READ(N);
5
WRITE(N," =");
6
P:=2;
7
WHILE P*P<N DO
8
BEGIN
9
WHILE N MOD P<>0 DO
10
P:=P+1;
11
REPEAT N:=N DIV P;
12
WRITE(P:3);
13
IF N>1
14
THEN WRITE(" *")
15
UNTIL N MOD P<>0
16
END;
17
IF N>1
18
THEN WRITE(N:3)
19
END.