有求任意随机数的公式吗?
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/21 08:32:32
有求任意随机数的公式吗?
有求任意随机数的公式吗?
有求任意随机数的公式吗?
EXCEl中,RAND()是取0~1之间的随机数的函数;RANDBETWEEN(N,M)是取指定的[n,m]区间的随机数的函数.如:
=RAND()*20 则取小于20的随机数
=INT(RAND()*20) 则取小于20的随机整数
=RANDBETWEEN(100,1000) 则取100~1000之间的随机数
RAND()和RANDBETWEEN()函数的转换(因为有些版本没有randbetwwen()函数)
RANDBETWEEN(100,1000)=INT(RAND()*(1000-100))+100
即:randbetween(n,m)=rand()*(m-n)+n (如果要整数,加INT()函数即可)
(Math.random())
=CONCATENATE(RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),...
全部展开
=CONCATENATE(RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9),RANDBETWEEN(0,9)) 这是20位的随机数.
收起
都说是任意随机啦,怎么可能会有。