Exercises & activities from the go workshop provided by Packt: https://courses.packtpub.com/courses/go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

27 lines
372 B

package main
import "fmt"
func fizzBuzz() {
for i := 1; i <= 30; i++ {
if i%15 == 0 {
fmt.Println("FizzBuzz")
} else if i%3 == 0 {
fmt.Println("Fizz")
} else if i%5 == 0 {
fmt.Println("Buzz")
} else {
fmt.Println(i)
}
}
}
func main() {
fmt.Println("Main is in control")
fizzBuzz()
fmt.Println("Back to main")
}