SHARE
TWEET

Untitled

a guest Oct 10th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     for i := 1; i <= 100; i++ {
  7.         switch {
  8.         case i%15 == 0:
  9.             fmt.Println("fizzbuzz")
  10.         case i%3 == 0:
  11.             fmt.Println("fizz")
  12.         case i%5 == 0:
  13.             fmt.Println("buzz")
  14.         default:
  15.             fmt.Println(i)
  16.         }
  17.     }
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top