Created
November 27, 2014 22:29
-
-
Save gcv/693532d603db3e19078a to your computer and use it in GitHub Desktop.
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() { | |
for i := 1; i <= 100; i++ { | |
if i % 3 == 0 { | |
fmt.Print("Fizz") | |
} | |
if i % 5 == 0 { | |
fmt.Print("Buzz") | |
} | |
if i % 3 != 0 && | |
i % 5 != 0 { | |
fmt.Print(i) | |
} | |
fmt.Println() | |
} | |
} |
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() { | |
for i := 1; i <= 100; i++ { | |
if i%3 == 0 { | |
fmt.Print("Fizz") | |
} | |
if i%5 == 0 { | |
fmt.Print("Buzz") | |
} | |
if i%3 != 0 && | |
i%5 != 0 { | |
fmt.Print(i) | |
} | |
fmt.Println() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment