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

⟦9d976f48a⟧ TextFile

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

Derivation

└─⟦08ea08c61⟧ Bits:30003924 PolyPascal programmer
    └─ ⟦this⟧ »PYTHAGO.PAS« 
└─⟦09235ab48⟧ Bits:30003065 Demoprogrammer K-Z til Pascal bog
    └─ ⟦this⟧ »PYTHAGO.PAS« 
└─⟦092727b26⟧ Bits:30005927 Demoprogrammer til Pascal bog (Jet-80)
    └─ ⟦this⟧ »PYTHAGO.PAS« 

TextFile

PROGRAM pythago;

  (* Pythagoræiske talsæt *)
  
  VAR
    max, a, b, c : INTEGER;
  
  BEGIN
    WRITE(CLRHOM);
    WRITE('Indtast øverste grænse for tallene: '); READLN(max);
    WRITELN;
    WRITELN('   A      B       C');
    WRITELN;
    FOR c := 1 TO max DO
      FOR b := 1 TO c DO
        FOR a := 1 TO b DO
          IF a * a + b * b = c * c
            THEN WRITELN(a : 4, b : 7, c : 8);
  END.
«eof»