DataMuseum.dk

Presents historical artifacts from the history of:

CP/M

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

See our Wiki for more about CP/M

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦c7767fe53⟧ TextFile

    Length: 384 (0x180)
    Types: TextFile
    Names: »HARMONIC.PAS«

Derivation

└─⟦08ea08c61⟧ Bits:30003924 PolyPascal programmer
    └─ ⟦this⟧ »HARMONIC.PAS« 
└─⟦092727b26⟧ Bits:30005927 Demoprogrammer til Pascal bog (Jet-80)
    └─ ⟦this⟧ »HARMONIC.PAS« 
└─⟦3702e543b⟧ Bits:30003064 Demoprogrammer A-J til Pascal bog
    └─ ⟦this⟧ »HARMONIC.PAS« 
└─⟦f983c2ef3⟧ Bits:30004681 Pascal opgaver (Butler)
    └─ ⟦this⟧ »HARMONIC.PAS« 

TextFile

PROGRAM harmonic;

  VAR
    i : INTEGER;
    sum, graense : REAL;
    
  BEGIN
    WRITE(CLRHOM);
    WRITE('Tast grænse: '); READLN(graense);
    sum := 0;
    i := 0;
    WHILE sum < graense DO
      BEGIN
        i := i + 1;
        sum := sum + 1 / i;
      END;
    WRITELN('Med ', i, ' led bliver summen: ', sum);
  END.
«eof»