-->
当前位置:首页 > 题库

单选题:以下( )表达式产生一个0~7之间(含0,7)的随机整数。

Luz5年前 (2021-05-10)题库1476
以下( )表达式产生一个0~7之间(含0,7)的随机整数。 @[C](2)

A. Math.floor(Math.random()*6)
B. Math.floor(Math.random()*7)
C. Math.floor(Math.random()*8)
D. Math.ceil(Math.random()*8)




A.Math.floor(Math.random()*6)
B.Math.floor(Math.random()*7)
C.Math.floor(Math.random()*8)
D.Math.ceil(Math.random()*8)


答案:C