用js生成三位数乘以两位数和三位数乘以一位数。有没有帮帮我啊!!我一一名小学数学老师。
2条回答 默认 最新
threenewbee 2023-08-17 09:43关注var a = Math.floor(Math.random() * 900) + 100; // 生成100到999之间的三位数 var b = Math.floor(Math.random() * 90) + 10; // 生成10到99之间的两位数, Math.floor(Math.random() * 9) + 1;是1位数 var result = a * b; console.log(a + " * " + b + " = " + result);解决 无用评论 打赏 举报