DataMuseum.dk

Presents historical artifacts from the history of:

Bogika Butler

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

See our Wiki for more about Bogika Butler

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦c7767fe53⟧ TextFile

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

Derivation

└─⟦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»