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

Quelle  2-prime.cob   Sprache: Cobol

 

       identification division.
       program-id. prime.
      *  aus Gödel, on formally undecidable propositions 
       author. "JD".
       date-written. 11.8.2007.
       date-compiled.
       data division.
       linkage section.
       77 x   pic 9(4).
       77 z   pic 9(4).
       procedure division using x returning z.
      * computes prime(x) 
         move 0 to z
      * invariant z < x   
         perform until z >= x
           if function divisible(z, x) then
             stop run
           else
             add 1 to z
         end-perform.
      *  r = x | y
          if z>0 then move 1 to z
        end-program prime.

Messung
CHZG
949810097

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

*© Formatika GbR, Deutschland