update
This commit is contained in:
7
2021-07-06/fizz_buzz/Cargo.lock
generated
Normal file
7
2021-07-06/fizz_buzz/Cargo.lock
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "fizz_buzz"
|
||||
version = "0.1.0"
|
||||
8
2021-07-06/fizz_buzz/Cargo.toml
Normal file
8
2021-07-06/fizz_buzz/Cargo.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
[package]
|
||||
name = "fizz_buzz"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
1
2021-07-06/fizz_buzz/src/main.rs
Normal file
1
2021-07-06/fizz_buzz/src/main.rs
Normal file
@@ -0,0 +1 @@
|
||||
fn main(){for n in 1..101{let mut m=String::new();if n%3==0{m+="Fizz";}if n%5==0{m+="Buzz";}println!("{}",if m.len()==0{n.to_string()}else{m});}}
|
||||
Reference in New Issue
Block a user