identificationdivision. program-id. agev. * aus Wirth, systematisches Programmieren p. 126 author. "JD". date-written. 11.9.2005. date-compiled. datadivision. working-storagesection.
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). linkagesection.
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. proceduredivisionusing x array b. * solve equation x = a * b for matrices performvarying k from 1 by 1 until k = n compute p = 1/a(k, k) performvarying j from k+1 until j = n multiply a(k, j) by p end-perform multiply b(k) by p performvarying i from k+1 until i = n performvarying 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 performuntil k = 0 move b(k) to t performvarying 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 V0.5
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.