mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-10 12:49:18 +00:00
Update fizzbuzz.rs
This commit is contained in:
parent
0b1af87faf
commit
cc62b8b5c1
@ -12,12 +12,6 @@
|
||||
// I AM NOT DONE
|
||||
|
||||
pub fn fizzbuzz(num: i32) -> String {
|
||||
match (num % 3, num % 5) {
|
||||
(0, 0) => "fizzbuzz".to_string(),
|
||||
(0, _) => "fizz".to_string(),
|
||||
(_, 0) => "buzz".to_string(),
|
||||
(_, _) => num.to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
// Don't change this part(the tests)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user