|
|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 640 (0x280)
Types: TextFile
Names: »BINOM1.PAS«
└─⟦08ea08c61⟧ Bits:30003924 PolyPascal programmer
└─⟦this⟧ »BINOM1.PAS«
└─⟦092727b26⟧ Bits:30005927 Demoprogrammer til Pascal bog (Jet-80)
└─⟦this⟧ »BINOM1.PAS«
└─⟦3702e543b⟧ Bits:30003064 Demoprogrammer A-J til Pascal bog
└─⟦this⟧ »BINOM1.PAS«
PROGRAM binom1;
VAR
n, r, graense : INTEGER;
FUNCTION k(n, r : INTEGER) : INTEGER;
VAR
i : INTEGER;
produkt : REAL;
BEGIN
produkt := 1;
FOR i := 1 TO r DO
produkt := produkt * (n + 1 - i) / (r + 1 - i);
k := ROUND(produkt);
END;
BEGIN
WRITE(CLRHOM);
WRITE('Tast antal linier: '); READLN(graense);
FOR n := 1 TO graense DO
BEGIN
FOR r := 0 TO n DO
WRITE(k(n,r) : 4);
WRITELN;
END;
END.
«eof»