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

Quelle  fileint.cob   Sprache: Cobol

 

       identification division.
       program-id. fileint.
      *  aus Wirth, systematisches Programmieren p. 71 
       author. "JD".
       date-written. 25.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.
        78 n pic 9(4) value 100.
        77 a pic 9(4).
        77 b pic 9(4).
        77 f-status pic S9(4) comp.
       procedure division.
      * computes x / y
         move 1 to a b.
         open output f
         perform until a >= n
      *    invariant a = (b+1)**2 / 4   
           write f-record from a
           add 2 to b
           add b to a
         end-perform.
         close f
        end-program fileint.

Messung
CHZG
929910096

¤ Dauer der Verarbeitung: 0.6 Sekunden  (vorverarbeitet am  2026-11-25) ¤

*© Formatika GbR, Deutschland