DataMuseum.dk

Presents historical artifacts from the history of:

RegneCentralen RC700 "Piccolo"

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

See our Wiki for more about RegneCentralen RC700 "Piccolo"

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦1d1318a48⟧ TextFile

    Length: 512 (0x200)
    Types: TextFile
    Names: »BINOM2.PAS«

Derivation

└─⟦3702e543b⟧ Bits:30003064 Demoprogrammer A-J til Pascal bog
    └─ ⟦this⟧ »BINOM2.PAS« 

TextFile

PROGRAM binom2;

  VAR
    n, r, graense : INTEGER;
  
  FUNCTION k(n, r : INTEGER) : INTEGER;
  
    BEGIN
      IF r = 0
        THEN k := 1
        ELSE k := ROUND(k(n, r - 1) * (n + 1 - r) / r);
    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»