This commit is contained in:
2021-07-06 20:48:49 -05:00
parent c296dce683
commit 6896d03214
5 changed files with 110 additions and 0 deletions

7
2021-07-06/fizz_buzz/Cargo.lock generated Normal file
View 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"

View 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]

View 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});}}