Goofing around with some teensy FizzBuzz

This commit is contained in:
2013-05-09 00:48:42 -04:00
parent 0b171d63b5
commit 5077e5302e
4 changed files with 48 additions and 0 deletions

15
zzz/fizzbuzz/main.go Normal file
View File

@@ -0,0 +1,15 @@
package main
func main() {
for i, s := 1, ""; i < 101; i++ {
if i%3 == 0 {
s = "Fizz"
if i%5 == 0 {
s += "Buzz"
}
} else if i%5 == 0 {
s = "Buzz"
}
print(s)
}
}