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

单选题:Which expression below is for generating a random number of [20,

Luz5年前 (2021-05-10)题库864
Which expression below is for generating a random number of [20,999]? @[B](2)

A. `(int)(20+Math.random()*979) `
B. `20+(int)(Math.random()*980)`
C. `(int)Math.random()*999`
D. `20+(int)Math.random()*980`





A.`(int)(20+Math.random()*979) `
B.`20+(int)(Math.random()*980)`
C.`(int)Math.random()*999`
D.`20+(int)Math.random()*980`


答案:B