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.
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
|
Haftungshinweis
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 ist noch experimentell.
|