identification division.
program-id. fileint.
* aus Wirth, systematisches Programmieren p. 71
author. "JD".
date-written. 25.10.2004.
date-compiled.
environment division.
input-output section.
file-control.
select f assign to file-f
status f-status.
data division.
file section.
fd f
record contains 120 characters
data record is f-record
label record is omitted.
01 f-record.
05 i pic x(8).
working-storage section.
78 n pic 9(4) value 100.
77 a pic 9(4).
77 b pic 9(4).
77 f-status pic S9(4) comp.
procedure division.
* computes x / y
move 1 to a b.
open output f
perform until a >= n
* invariant a = (b+1)**2 / 4
write f-record from a
add 2 to b
add b to a
end-perform.
close f
end-program fileint.
¤ Dauer der Verarbeitung: 0.31 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.
|