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 = 10;
- let mut array = [0; SIZE];
- for element in &mut array {
- *element = rand::thread_rng().gen_range(1, 100 + 1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement