//Math.random()只能生成0~1的小數;
//toFixed(2)保留2位小數
var num = Math.random().toFixed(2)*400 + 100;
System.out.println((int)(4000 * Math.random() + 1000)); 1000-5000之間
System.out.println((int)(5000 * Math.random() + 5000)); 5000-10000之間
var num = Math.random().toFixed(2)*400 + 100;
System.out.println((int)(4000 * Math.random() + 1000)); 1000-5000之間
System.out.println((int)(5000 * Math.random() + 5000)); 5000-10000之間