Last active
October 12, 2023 11:49
-
-
Save nakasyou/b97528df585d36ac8469ae05f92e9ac1 to your computer and use it in GitHub Desktop.
Goやってみた
This file contains hidden or 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 () { | |
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