Created
July 29, 2014 15:35
-
-
Save MatejLach/0618e0a668ac47e29b4a to your computer and use it in GitHub Desktop.
An example of a nested for/while loop 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() { | |
let lang = "Rust"; | |
let rust_is_amazing = true; | |
let mut count = 0i; | |
for _ in range(0i, 5) { | |
while count < 10 && rust_is_amazing == true { | |
println!("Is, {} amazing? {}", lang, rust_is_amazing); | |
count += 1; | |
} | |
count = 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment