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

Quelle  sombrero.cob   Sprache: Cobol

 

       identification division.
       program-id. sombrero.
      *  aus D.Nowottny p. 56
      * Mathematik am Computer
       author. "JD".
       date-written. 24.9.2006.
       date-compiled.
       data division.
       working-storage section.
         78 n   pic 9(4) value 3.
         01 occurs n.
           05 a  pic 9(4)V99 occurs n.
         01 occurs n.
           05 F  pic 9(4)V99 occurs n.
         77 i   pic 9(4).
         77 j   pic 9(4).
         77 x   pic 9(4)V99.
         77 y   pic 9(4)V99.
         77 r   pic 9(4)V99.
         77 te  pic 9(4)V99.
       linkage section.
       procedure division.
      *  sombrero function F(i,j)
         move -15 to x
         move 1 to i
         perform until x > 15
           move -15 to y
           move 1 to j
           perform until y > 15
             compute te=x*x+y*y
             compute r      = function sqrt(te)
             compute F(i,j) = function sin(r)/(1+r)
             add 1 to y
             add 1 to j
           end-perform
           add 1 to x
           add 1 to i  
         end-perform
      *  nun kann geplottet werden
        end-program  sombrero.

Messung
CHZG
1009910099

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

*© Formatika GbR, Deutschland