IdentificationDivision. Program-Id. Victor. * Buch "Introduction to Cybernetics", 1966 * von Viktor Gluschkow * p272 DataDivision. Working-StorageSection.
78 n value 100.
77 p pic 9(4).
77 i pic 9(4).
77 j pic 9(4).
77 k pic 9(4).
77 s pic 9(4).
77 xf pic 9(4).
77 xs pic 9(4).
77 vs pic 9(4).
77 vf pic 9(4).
77 yf pic 9(4).
77 ys pic 9(4).
77 sf pic 9(4)V99.
77 ss pic 9(4)V99.
77 a pic 9.
77 r pic 9 occurs n. ProcedureDivision. * Formula
L. accept r move 0 to sf ss move 0 to s performvarying i from 1 until i=n if r(xf(i)) andnot r(yf(i)) then add vf(i) to sf end-if if r(xs(i)) andnot r(ys(i)) then add vf(i) to sf end-if end-perform if sf>ss move 1 to p. if sf<ss move 2 to p. if sf=ss goto L. display p accept a if a and (p=1) then performvarying j from 1 until j=n if r(xf(j)) andnot r(yf(j)) then add 1 to vf(j) end-perform if a and (p=2) then performvarying k from 1 until k=n if r(xs(k)) andnot r(ys(k)) then add 1 to vs(k) end-perform goto L. * P=??? End-Program Victor.
¤ Dauer der Verarbeitung: 0.14 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.