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

Quelle  Dahl-p122.cbl   Sprache: Cobol

 

       identification division.
       program-id. dahl-p122.
      * aus O-J Dahl - Verifiable Programming
      * prog 1
       author. Jens.
       date-written. 5.1.2009.
       date-compiled.
       data division.
       working-storage section.
       77 x     pic 9(4).
       77 y     pic 9(4).
       77 q     pic 9(4).
       linkage section.
       77 n     pic 9(4).
       procedure division using n.
         move 0 to y
         move n to y
         move 1 to q
         perform until q>n multiply 4 by q end-perform
         perform until q = 1
           divide 4 into q
           if y<x+q then divide 2 into x
           else 
             compute y=y- (x+q)
             compute x=x/2+q
           end-if  
         end-perform
        end-program dahl-p122.

Messung
CHZG
849710093

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


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.