Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/COBOL/verschiedene-Autoren/Wirth/   (verschiedene Autoren Version 0.7©)  Datei vom 4.1.2008 mit Größe 1 kB image not shown  

Quelle  fileavg.cob

  Sprache: Cobol
 

       identification division.
       program-id. fileavg.
      *  aus Wirth, systematisches Programmieren p. 73 
       author"JD".
       date-written25.10.2004.
       date-compiled.
       environment division.
       input-output section.
       file-control.
         select f assign to file-f
         status f-status.
       data division.
       file section.
        fd f
        record contains 120 characters
        data record is f-record
        label record is omitted.
        01 f-record.
          05 i pic x(8).
       working-storage section.
        77 m pic 9(4).
        77 n pic 9(4).
        77 s pic 9(4).
        77 f-status pic S9(4comp.
       procedure division.
      * computes x / y
         move 0 to m n.
         open input f
         perform until f-status <= 0
           read f into f-record
           add 1 to n
           add i to m
         end-perform.
         close f
         divide n into m
         move 0 to s
         open input f
         perform until f-status <= 0
           read f into f-record
           add 1 to n
           add i to m
         end-perform.
         compute s = function sqrt(n)
      * sqrt(a/n) ???  
         display "s=" s.
        end-program fileavg.

Messung V0.5 in Prozent
C=81 H=97 G=89

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-06-15) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.