Zufallszahlengenerator in Rost
use rand::Rng;
fn main() {
let mut rng = rand::thread_rng();
let n1: u8 = rng.gen();
println!("Random u8: {}", n1);
println!("Random u32: {}", rng.gen::<u32>());
//print with range[1 to 4]
let n2: u8 = rand::thread_rng().gen_range(1..5);
}
Bijay Poudel