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

Quelle  Apt-p101.cbl   Sprache: Cobol

 

       identification division.
       program-id. apt-p81.
      * aus Apt-Olderog - Programmverifikation
       author. Jens.
       date-written. 5.1.2009.
       date-compiled.
       data division.
       working-storage section.
       77 i       pic 9(4).
       77 j       pic 9(4).
       77 oddtop  pic 9(4).
       77 eventop pic 9(4).
       linkage section.
       77 n  pic 9(4).
       77 a  pic 9(4) occurs 100.
       77 k  pic 9(4).
       procedure division using n a returning k.
         move 1 to i
         move 2 to j
         add 1 to n giving oddtop
         add 1 to n giving eventop
         perform S1
         perform S2
         move function min(oddtop,eventop) to k
         stop run.
        S1.
         perform until i>=oddtop
           if a(i)>0 then move i to oddtop
           else add 2 to i end-if
         end-perform.
        S2.
         perform until j>=eventop
           if a(j)>0 then move j to eventop
           else add 2 to j end-if
         end-perform.
        end-program apt-p81.

Messung
CHZG
8210010094

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland