java基础学习系列三

产生随机数

例如

[a,b]

Math.random*(b-a+1)+a

公式推算

[3,55]-----[0,52]+3

*53+3

 

posted @ 2018-01-20 11:25  刘百会  阅读(94)  评论(0编辑  收藏  举报