注:println()为自己编写的输出函数。
math对象
ceil(x)上舍入
floor(x)下舍入
round(x)四舍五入
random()0-1的随机数
println(Math.ceil(13.3));//14
println(Math.floor(13.3));//13
println(Math.round(13.3));//13
获取十个1到10之间的随机数
for (var i = 0; i < 10; i++) { println(Math.floor(Math.random()*10+1));
}