Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Delphi/Bille 0.71/__history/     Datei vom 16.0.2013 mit Größe 31 kB image not shown  

Impressum agev.cob   Sprache: Cobol

 

       identification division.
       program-id. agev.
      *  aus Wirth, systematisches Programmieren p. 126 
       author. "JD".
       date-written. 11.9.2005.
       date-compiled.
       data division.
       working-storage section.
         78 n   pic 9(4) value 100.
         77 i   pic 9(4).
         77 j   pic 9(4).
         77 k   pic 9(4).
         77 p   pic 9(4)V9(4).
         77 t   pic 9(4)V9(4).
       linkage section.
         01 array occurs n.
           05 a pic 9(4)V9(4) occurs n.
         77 b     pic 9(4)V9(4) occurs n.
         77 x     pic 9(4)V9(4) occurs n.
       procedure division using x array b.
      *  solve equation x = a * b for matrices
         perform varying k from 1 by 1 until k = n
           compute p = 1/a(k, k)
           perform varying j from k+1 until j = n
             multiply a(k, j) by p
           end-perform  
           multiply b(k) by p
           perform varying i from k+1 until i = n
             perform varying j from k+1 until j = n
               compute a(i,j) = a(i,j) - a(i,k)*a(k,j)
             end-perform  
             compute b(i) = b(i) - a(i,k)*b(k)
           end-perform
         end-perform
         move n to k
         perform until k = 0
           move b(k) to t
           perform varying j from k+1 until j = n
             compute t = t - a(k,j)*x(j)
           end-perform
           move t to x(k)
           subtract 1 from k
         end-perform.
      *  x(1) ... x(n) sind die Lösungen      
        end-program  agev.

Messung
CHZG
929910096

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

*Bot Zugriff