A.d>=1.0
B.0.0<=d<1.0
C.0.0<=d<Double.MAX_VALUE
D.0.0<=d<=Double.MAX_VALUE
E.Double.MIN_VALUE<=d<Double.MAX_VALUE
第1题:
【单选题】以下()表达式产生一个0~7之间(含0)的随机整数
A.Math. floor(Math. Random()* 6)
B.Math. floor (Math. Random()*7)
C.Math. floor (Math. Random()*8)
D.Math. ceil(Math. Random()*8)
第2题:
下列可以产生一个1~100之间随机整数的表达式是()。
A.(int)(Math.random(100)+1)
B.(int)Math.random(100)+1
C.(int)Math.random()*100+1
D.(int)(Math.random()*100+1)
第3题:
【单选题】以下()表达式产生一个0~7之间(含0,7)的随机整数
A.Math.floor(Math.random()*6)
B.Math.floor(Math.random()*7)
C.Math.floor(Math.random()*8)
D.Math.ceil(Math.random()*8)
第4题:
要产生[10,100]之间的随机整数使用哪个表达式?
A.(int)(Math.random()*100)
B.10+(int)(Math.random()*91)
C.10+(int)Math.random()*90
D.10+(int)Math.random()*91
第5题:
生成一个[1,10]之间的随机整数,以下选项正确的是()。
A.int a = (int)(Math.random()*10);
B.int a =(int)(Math.random()*9)+1;
C.int a = (int)(Math.random()*9);
D.int a = (int)(Math.random()*10)+1;