Created
April 8, 2022 18:57
-
-
Save jcar787/e300947c344aa83daa00bfdbb34e3592 to your computer and use it in GitHub Desktop.
For loop example in rust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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