題組內容
7. procedure Prog1 (n)
if (n>1)
then
(Apply the procedure Prog1 to n/2 (integer division), and then print out the value (n mod 2).)
else
(Print out the value n.)
(b) If n=9, what is the result from Prog1?
7. procedure Prog1 (n)
if (n>1)
then
(Apply the procedure Prog1 to n/2 (integer division), and then print out the value (n mod 2).)
else
(Print out the value n.)
(b) If n=9, what is the result from Prog1?