DataMuseum.dk

Presents historical artifacts from the history of:

Bogika Butler

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

See our Wiki for more about Bogika Butler

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦692564dd7⟧ TextFile

    Length: 896 (0x380)
    Types: TextFile
    Names: »BINTERN.PAS«

Derivation

└─⟦f983c2ef3⟧ Bits:30004681 Pascal opgaver (Butler)
    └─ ⟦this⟧ »BINTERN.PAS« 

TextFile

PROGRAM bintern;

  CONST
    serielaengde = 10;
    
  TYPE
    arr = ARRAY(.0 .. serielaengde.) OF INTEGER;
  
  VAR
    tabel : arr;
    antal, seksere, kast, i, j : INTEGER;
  
  BEGIN
    WRITE(CLRHOM);
    WRITE('Indtast antal serier: ');
    READLN(antal);
    RANDOMIZE;
    FOR i := 0 TO serielaengde DO
      tabel(.i.) := 0;
    FOR i := 1 TO antal DO
      BEGIN
        seksere := 0;
        FOR j := 1 TO serielaengde DO
          BEGIN
            kast := RANDOM(6);
            IF kast = 0
              THEN seksere := seksere + 1;
          END;
        tabel(.seksere.) := tabel(.seksere.) + 1;
      END;
    WRITELN;
    WRITELN('ANTAL SEKSERE       FREKVENS');
    WRITELN;
    FOR i := 0 TO serielaengde DO
      WRITELN(i : 6, tabel(.i.) / antal * 100 : 20 : 2, ' %');
  END.
«eof»