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

⟦d54e3b82f⟧ TextFile

    Length: 640 (0x280)
    Types: TextFile
    Names: »SFD.PAS«

Derivation

└─⟦08ea08c61⟧ Bits:30003924 PolyPascal programmer
    └─ ⟦this⟧ »SFD.PAS« 

TextFile

PROGRAM sfd;
  
  VAR
    tal1, tal2 : INTEGER;
  
  FUNCTION faelles(n, m : INTEGER) : INTEGER;
    
    BEGIN (* faelles *)
      IF m = 0
        THEN faelles := n
        ELSE faelles := faelles(m, n MOD m);
    END; (* faelles *)
  
  BEGIN (* sfd *)
    WRITE(CLRHOM);
    WRITE('Indtast 1. tal : '); READLN(tal1);
    WRITE('Indtast 2. tal : '); READLN(tal2);
    WRITE('Største fælles divisor for ', tal1, ' og ', tal2, ' er ');
    tal1 := ABS(tal1); tal2 := ABS(tal2);
    WRITELN(faelles(tal1, tal2));
  END. (* sfd *)
«eof»