brought back fizz buzz

This commit is contained in:
2022-11-17 09:27:47 +03:00
parent 7787ff842b
commit 3c45b4ae4f
2 changed files with 21 additions and 1 deletions

18
FizzBuzz/fizzbuzz.go Normal file
View File

@@ -0,0 +1,18 @@
package FizzBuzz
import "fmt"
func Fizzbuzz() {
for i := 1; i < 101; i++ {
switch {
case i%15 == 0:
fmt.Println("FizzBuzz")
case i%3 == 0:
fmt.Println("Fizz")
case i%5 == 0:
fmt.Println("Buzz")
default:
fmt.Println(i)
}
}
}