Skip to content

Instantly share code, notes, and snippets.

@mruczek
Created August 6, 2022 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mruczek/47b097e2bd57b18fe8f0d63ffde357cc to your computer and use it in GitHub Desktop.
Save mruczek/47b097e2bd57b18fe8f0d63ffde357cc to your computer and use it in GitHub Desktop.
fn main() {
let mut numbers: [u32; 40] = [0; 40];
numbers[1] = 1;
for i in 2..numbers.len() {
numbers[i] = numbers[i - 1] + numbers[i - 2];
}
println!("{:?}", numbers);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment