以下程序段中Do...Loop循环执行的次数为______。 n=5 Do if n mod 2=0 then n=n\2 else n=n*3+1 end if

admin2010-03-30  28

问题 以下程序段中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

答案4

解析
转载请注明原文地址:https://kaotiyun.com/show/M71p777K
0

最新回复(0)