identification division.
program-id. dahl-p91.
* aus O-J Dahl - Verifiable Programming
author. Jens.
date-written. 5.1.2009.
date-compiled.
data division.
working-storage section.
77 x pic 9(4).
77 d pic 9(4).
linkage section.
77 a pic 9(4).
77 b pic 9(4).
77 y pic 9(4).
procedure division using a b returning y.
move 1 to x
move a to y
move b to d
perform with test after until d = 0
if function mod(d,2) not = 0 then
multiply y by x
end-if
divide 2 into d
end-perform
end-program dahl-p91.
¤ Dauer der Verarbeitung: 0.13 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.
|