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

Quelle  skalar.cob   Sprache: Cobol

 

       identification division.
       program-id. skalar.
      *  aus Wirth, systematisches Programmieren p. 81 
       author. "JD".
       date-written. 11.9.2005.
       date-compiled.
       data division.
       working-storage section.
       78 n   pic 9(4) value 10.
       77 i   pic 9(4).
       linkage section.
       77 x   pic 9(4)V9(4) occurs n.
       77 y   pic 9(4)V9(4) occurs n.
       77 r   pic 9(4)V9(4).
       procedure division using x y r.
      * computes scalar product of x and y
         move 0 to i r
         perform until i = n
           add 1 to i
           compute r = r + x(i) * y(i)
         end-perform.
        end-program skalar.

Messung
CHZG
8710010095

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

*© Formatika GbR, Deutschland