📅  最后修改于: 2022-03-11 14:59:08.452000             🧑  作者: Mango
use rand::Rng;
fn main() {
let mut rng = rand::thread_rng();
println!("Integer: {}", rng.gen_range(0..10));
println!("Float: {}", rng.gen_range(0.0..10.0));
}