Identification Division.
Program-Id. franzec-p155.
Author. "Nissim Francez".
* "aus Program Verification"
Data Division.
Linkage Section.
* variables
77 x pic S9(8).
77 y pic S9(8).
Procedure Division using x y.
perform Power2.
stop run.
Power2.
if x=0 then
move 1 to y
else
subtract 1 from x
perform power2
add 1 to x
multiply 2 by y
end-if.
display "x="x" y="y
End-Program franzec-p155.
¤ Dauer der Verarbeitung: 0.60 Sekunden
¤
*© Formatika GbR, Deutschland