Created
January 6, 2015 07:51
-
-
Save rootulp/c63ffac2acfce0381412 to your computer and use it in GitHub Desktop.
CracklePop implementation 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 mut i :uint = 1; | |
while i <= 100 { | |
if i % 15 == 0 { | |
println!("CracklePop"); | |
} | |
else if i % 5 == 0 { | |
println!("Pop"); | |
} | |
else if i % 3 == 0 { | |
println!("Crackle"); | |
} | |
else { | |
println!("{}", i.to_string()); | |
} | |
i += 1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment