Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extern crate rand;
- use rand::Rng;
- fn main() {
- const SIZE: usize = 100;
- let mut array = [0; SIZE];
- for e in array.iter_mut() {
- *e = rand::thread_rng().gen_range(1, 100 + 1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement