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

SSL division.cob   Sprache: Cobol

 

       Identification Division.
       Program-Id. hdivision.
       Author. "Bergeretti/Carre".
      * hardware division 
       Data Division.
       Working-Storage Section.
      * variables
         77 w   pic S9(8).
       Linkage Section.
         77 x pic S9(8).
         77 y pic S9(8).
         77 q pic S9(8).
         77 r pic S9(8).
       Procedure Division using x y q r.
      *  x >= 0 and y > 0  
      *  
         move x to r
         move 0 to q
         move y to w
         perform until w>x
           multiply 2 by w
         end-perform
         perform until w = y
           multiply 2 by q
           divide   2 into w
           if w<=r then
             subtract w from r
             add      1 to   q
           end-if
         end-perform.
       End-Program hdivision.

Messung
CHZG
1009910099

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

*© Formatika GbR, Deutschland