Initial Commit

This commit is contained in:
Rekai Nyangadzayi Musuka 2021-03-29 19:06:13 -05:00
commit 7eda2d71ff
4 changed files with 28 additions and 0 deletions

1
2020-09-26/fizz_buzz/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

5
2020-09-26/fizz_buzz/Cargo.lock generated Normal file
View File

@ -0,0 +1,5 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "fizz_buzz"
version = "0.1.0"

View File

@ -0,0 +1,9 @@
[package]
name = "fizz_buzz"
version = "0.1.0"
authors = ["Rekai Musuka <--show>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View File

@ -0,0 +1,13 @@
fn main() {
for n in 1..100 {
if n % 15 == 0 {
println!("FizzBuzz!")
} else if n % 5 == 0 {
println!("Buzz");
} else if n % 3 == 0 {
println!("Fizz");
} else {
println!("{}", n);
}
}
}