×

Loading...

以下程序有可能会死循环吗?

sxffff (lookingforjob)
var a = new java.util.Random().nextInt(100000)
while (a!=1){
if (a%2==0){
a=a/2
} else {
a= a*3+1
}
print(a)
}
print(a)
(#11941799@0)
2019-2-20 -04:00
Reply
Share Online by QR Code
Page address has been copied.
To share, click to copy page address.

Back To Topic: 以下程序有可能会死循环吗?

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习学科技术