Skip to content

Instantly share code, notes, and snippets.

@fokosun
Created September 11, 2023 14:53
Show Gist options
  • Save fokosun/4390f6c14de02bb45335e1265f408752 to your computer and use it in GitHub Desktop.
Save fokosun/4390f6c14de02bb45335e1265f408752 to your computer and use it in GitHub Desktop.
coding exercise
package main
import "fmt"
func main() {
fmt.Println("fizz buzz game for developers!")
for n := 1; n <= 20; n++ {
if n%15 == 0 {
fmt.Println("fizz buzz")
} else if n%5 == 0 {
fmt.Println("buzz")
} else if n%3 == 0 {
fmt.Println("fizz")
} else {
fmt.Println(n)
}
}
}
package main
import (
"testing"
)
func TestFizzBuzz(t *testing.T) {
//WIP
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment