identification division.
program-id. apt-p81.
* aus Apt-Olderog - Programmverifikation
author. Jens.
date-written. 5.1.2009.
date-compiled.
data division.
working-storage section.
77 i pic 9(4).
77 j pic 9(4).
77 oddtop pic 9(4).
77 eventop pic 9(4).
linkage section.
77 n pic 9(4).
77 a pic 9(4) occurs 100.
77 k pic 9(4).
procedure division using n a returning k.
move 1 to i
move 2 to j
add 1 to n giving oddtop
add 1 to n giving eventop
perform S1
perform S2
move function min(oddtop,eventop) to k
stop run.
S1.
perform until i>=oddtop
if a(i)>0 then move i to oddtop
else add 2 to i end-if
end-perform.
S2.
perform until j>=eventop
if a(j)>0 then move j to eventop
else add 2 to j end-if
end-perform.
end-program apt-p81.
¤ Dauer der Verarbeitung: 0.19 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.
|