Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- )
- func main() {
- for i := 1; i < 20; i++ {
- if i%3 == 0 && i%5 == 0 {
- fmt.Print("FizzBuzz")
- } else if i%5 == 0 {
- fmt.Print("Buzz")
- } else if i%3 == 0 {
- fmt.Print("Fizz")
- } else {
- fmt.Print(i)
- }
- fmt.Print(" ")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment