DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦e9503de20⟧ TextFile

    Length: 768 (0x300)
    Types: TextFile
    Names: »primetxt«

Derivation

└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
    └─⟦b2ec5d50f⟧ 
        └─⟦this⟧ »primetxt« 

TextFile

primep=set 25
primep=algol 
program til primfaktoropløsning
begin
long a,b,i,k;
integer j,l;
boolean first;
for a:=readl(<:heltal:>) while a=maxlong or a<0 do;
first:=true;
j:=4;
k:=sqrt(a*1.0);
if a>3 then
for i:=2,3,5 step j until k do
begin
  l:=0;
  j:=6-j;
  for b:=a//i while b*i=a do
  begin
    a:=b;
    l:=l+1
  end;
  if l>0 then
  begin
    if first then
    begin
      write(out,<:primtals faktorer:<10>:>);
      first:=false
    end;
    write(out,<<d>,i);
    if l>1 then write(out,<:**:>,<<d>,l);
    outendcur(10);
    k:=sqrt(a*1.0)
  end
end;
if first then write(out,<<d>,a,<: er et primtal<10>:>)
else
if a>1 then write(out,<<d>,a,"nl",1);
end
▶EOF◀