identificationdivision. program-id. dahl-p87. * aus O-J Dahl - Verifiable Programming author. Jens. date-written. 5.1.2009. date-compiled. datadivision. working-storagesection.
77 q pic 9(4).
77 y pic 9(4). linkagesection.
77 n pic 9(4).
77 x pic 9(4). proceduredivisionusing n returning x. move 0 to x move n to y move 1 to q performuntil q>n multiply 4 by q end-perform performuntil q=1 divide 4 into q if y<x+q thendivide 2 into x else compute y=y-(x+q) compute x=x/2+q end-if end-perform end-program dahl-p87.
¤ Dauer der Verarbeitung: 0.11 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.