Identification Division.
Program-Id. Indu3.
* Buch "Verification of Object Oriented Software", 2007
* Proving by Induction, p469
* von Angela Wallenberg
Data Division.
Working-Storage Section.
77 a pic 9(4).
77 b pic 9(4).
Linkage Section.
77 al pic 9(4).
77 bl pic 9(4).
77 zl pic 9(4).
77 z pic 9(4).
Procedure Division using al bl zl returning z.
* socalled Russian Multiplication
move al to a
move bl to b
move zl to z
perform until a not= zero
if function mod(a,2) not = zero then add b to z end-if
divide 2 into a
multiply 2 by b
end-perform.
End-Program Indu3.
¤ Dauer der Verarbeitung: 0.14 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.
|