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

Quelle  stau-p62.cob   Sprache: Cobol

 

       Identification Division.
       Program-Id. Laplace.
      * from Stauffer/Stanley
      * From Newton to Mandelbrot
      * Springer 1996
       Data Division.
       Working-Storage Section.
         01  occurs 20.
           05 ph        pic S9(4)V9(4) occurs 20.
         77 vx          pic S9(4)V9(4).
         77 vy          pic S9(4)V9(4).
         77 dt          pic S9(4)V9(4).
       Procedure Division.
        perform varying i from 1 until i>20 
          perform varying k from 1 until k>20 
            move 0.5 to ph(i,k)
         end-perform
         move 0 to ph(i,1)
         move 0 to ph(i,20)
        end-perform
        perform varying k from 1 until k>20 
          move 0 to ph(1,k)
          move 0 to ph(20,k)
        end-perform
        display 1, ph(1,10)
       L140.
        perform varying i from 2 until i>20 
          perform varying k from 2 until k>20 
            compute ph(i,k)=0.25*(ph(i-1,k)+ph(i+1,k)+ph(i,k-1)+ph(i,k+1))
         end-perform
        end-perform
        perform varying i from 1 until i>20 
          display i, ph(i,10)
        end-perform
        goto L140.
       End-Program Laplace.

Messung
CHZG
868910091

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

*© Formatika GbR, Deutschland