This commit is contained in:
Dan Buch 2013-05-09 01:02:36 -04:00
parent 5077e5302e
commit fa0de5c394

View File

@ -1,7 +1,10 @@
package main package main
import "fmt"
func main() { func main() {
for i, s := 1, ""; i < 101; i++ { for i := 1; i < 101; i++ {
s := fmt.Sprintf("%d", i)
if i%3 == 0 { if i%3 == 0 {
s = "Fizz" s = "Fizz"
if i%5 == 0 { if i%5 == 0 {
@ -10,6 +13,6 @@ func main() {
} else if i%5 == 0 { } else if i%5 == 0 {
s = "Buzz" s = "Buzz"
} }
print(s) fmt.Println(s)
} }
} }