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

SSL fak.cob   Sprache: Cobol

 

       identification division.
       program-id. fak.
      *  aus Wirth, systematisches Programmieren p. 61 
       author. "JD".
       date-written. 11.9.2005.
       date-compiled.
       data division.
       working-storage section.
       77 x pic 9(4).
       77 k pic 9(4).
       linkage section.
       77 n   pic 9(4).
       77 r   pic 9(4).
       procedure division using n r.
      * computes n!
         move 1 to x
         move 0 to k.
      * invariant x = k!
         perform until k = n
           add 1 to k
           multiply k by x
         end-perform.
         move x to r.
        end-program fak.

Messung
CHZG
9010010096

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

*© Formatika GbR, Deutschland