identification division.
program-id. kw123.
* aus Kowalk - Korrekte Software
* p. 123
author. Jens.
date-written. 5.1.2009.
date-compiled.
data division.
working-storage section.
77 b pic 9(4).
linkage section.
77 n pic 9(4).
77 a pic 9(4).
procedure division using n returning a.
move 0 to a
move 1 to b
perform until a>n
compute a = 2*a - b
compute b = 0.5*a + 0.5*b
end-perform
end-program kw123.
¤ Dauer der Verarbeitung: 0.3 Sekunden
¤
*© Formatika GbR, Deutschland