Skip to content

Instantly share code, notes, and snippets.

@nakasyou
Last active October 12, 2023 11:49
Show Gist options
  • Save nakasyou/b97528df585d36ac8469ae05f92e9ac1 to your computer and use it in GitHub Desktop.
Save nakasyou/b97528df585d36ac8469ae05f92e9ac1 to your computer and use it in GitHub Desktop.
Goやってみた
package main
import "fmt"
func main () {
var index int = 1
for (index <= 100) {
if (index % 15 == 0) {
fmt.Println("FizzBuzz")
} else if (index % 5 == 0) {
fmt.Println("Buzz")
} else if (index % 3 == 0) {
fmt.Println("Fizz")
} else {
fmt.Println(index)
}
index++
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment