Created
September 11, 2023 14:53
-
-
Save fokosun/4390f6c14de02bb45335e1265f408752 to your computer and use it in GitHub Desktop.
coding exercise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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