|
|
DataMuseum.dkPresents historical artifacts from the history of: Jet Computer Jet80 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Jet Computer Jet80 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 384 (0x180)
Types: TextFile
Names: »HARMONIC.PAS«
└─⟦092727b26⟧ Bits:30005927 Demoprogrammer til Pascal bog (Jet-80)
└─⟦this⟧ »HARMONIC.PAS«
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»