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

Quelle  Loecks-P153.cob   Sprache: Cobol

 

       identification division.
       program-id. sqrt.
      * from Loeck´/Sieber Example 8.4 p 153
       author. "DJ".
       date-written. 25.10.2004.
       date-compiled.
       data division.
       working-storage section.
       77 y2 pic 9(4).
       77 y3 pic 9(4).
       linkage section.
       77 x pic 9(4).
       77 y1 pic 9(4).
       procedure division using x returning y1.
      * calculates the squareroot of x
      * but only if x > 0 !
         move 0 to y1
         move 1 to y2 y3
         perform until y3 < x
           add 1 to y1
           add 2 to y2
           add y2 to y3
         end-perform.
        end-program sqrt.

Messung
CHZG
9010010096

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

*© Formatika GbR, Deutschland