identificationdivision. program-id. fileavg. * aus Wirth, systematisches Programmieren p. 73 author. "JD". date-written. 25.10.2004. date-compiled. environmentdivision. input-outputsection. file-control. select f assignto file-f status f-status. datadivision. filesection. fd f recordcontains 120 characters datarecordis f-record labelrecordisomitted.
01 f-record.
05 i pic x(8). working-storagesection.
77 m pic 9(4).
77 n pic 9(4).
77 s pic 9(4).
77 f-status pic S9(4) comp. proceduredivision. * computes x / y move 0 to m n. openinput f performuntil f-status <= 0 read f into f-record add 1 to n add i to m end-perform. close f divide n into m move 0 to s openinput f performuntil f-status <= 0 read f into f-record add 1 to n add i to m end-perform. compute s = function sqrt(n) * sqrt(a/n) ??? display"s=" s. end-program fileavg.
¤ Dauer der Verarbeitung: 0.11 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 ist noch experimentell.