以下程序段中Do...Loop循环执行的次数为______。n=5 Doif n
题型:单项选择题
问题:
以下程序段中Do...Loop循环执行的次数为______。
n=5
Do
if n mod 2=0 then
n=n\2
else
n=n*3+1
end if
Loop until n=1
A) 4
B) 3
C) 5
D) 2
以下程序段中Do...Loop循环执行的次数为______。
n=5
Do
if n mod 2=0 then
n=n\2
else
n=n*3+1
end if
Loop until n=1
A) 4
B) 3
C) 5
D) 2