Initial Commit
This commit is contained in:
commit
7eda2d71ff
|
@ -0,0 +1 @@
|
||||||
|
/target
|
|
@ -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"
|
|
@ -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]
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue