Skip to content

Instantly share code, notes, and snippets.

@jcar787
Created April 8, 2022 18:57
Show Gist options
  • Save jcar787/e300947c344aa83daa00bfdbb34e3592 to your computer and use it in GitHub Desktop.
Save jcar787/e300947c344aa83daa00bfdbb34e3592 to your computer and use it in GitHub Desktop.
For loop example in rust
fn main() {
for n in 1..8 {
println!("Your number is: {}", n + 5);
}
for n in 1..=8 {
println!("Your number is: {}", n + 5);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment