identification division.
program-id. dahl-p125.
* aus O-J Dahl - Verifiable Programming
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 k pic 9(4).
77 te pic 9(4).
linkage section.
77 n pic 9(4).
77 a pic 9(4) occurs 100.
77 b pic 9(4) occurs 100.
procedure division using n a b.
perform varying i from 1 until i > n
if i<=n then
move a(j) to a(i)
else
move j to b(i)
move 1 to k
perform until b(k) not= j add 1 to k end-perform
move i to b(i)
move k to b(k)
move a(i) to te
move j to b(te)
if k=i then move j to a(i)
else move k to a(i) end-if
end-if
end-perform
end-program dahl-p125.
¤ Dauer der Verarbeitung: 0.18 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.
|