Skip to main content
added 340 characters in body
Source Link

Go, 130 129129 134 bytes

 package main;funcmain;import."fmt";func main(){for i:=1;i<101;i++{o,a,b:="",i%3<1,i%5<1;if="";if ai%3<1{o+="Fizz"};if bi%5<1{o+="Buzz"};if o==""{printPrint(i)};println;Println(o)}}

I wish i had ternary operators...

Edit: @Dust pointed out that I printed to stderr so my solution actually increased in size :(

Try it online!

Go, 130 129 bytes

 package main;func main(){for i:=1;i<101;i++{o,a,b:="",i%3<1,i%5<1;if a{o+="Fizz"};if b{o+="Buzz"};if o==""{print(i)};println(o)}}

I wish i had ternary operators...

Go, 130 129 134 bytes

package main;import."fmt";func main(){for i:=1;i<101;i++{o:="";if i%3<1{o+="Fizz"};if i%5<1{o+="Buzz"};if o==""{Print(i)};Println(o)}}

I wish i had ternary operators...

Edit: @Dust pointed out that I printed to stderr so my solution actually increased in size :(

Try it online!

added 15 characters in body
Source Link

Go, 130130 129 bytes

 package main;func main(){for i:=1;i<101;i++{o,a,b:="",i%3<1,i%5<1;if a{o+="Fizz"};if b{o+="Buzz"};if !a&&!bo==""{print(i)};println(o)}}

I wish i had ternary operators...

Go, 130 bytes

package main;func main(){for i:=1;i<101;i++{o,a,b:="",i%3<1,i%5<1;if a{o+="Fizz"};if b{o+="Buzz"};if !a&&!b{print(i)};println(o)}}

I wish i had ternary operators...

Go, 130 129 bytes

 package main;func main(){for i:=1;i<101;i++{o,a,b:="",i%3<1,i%5<1;if a{o+="Fizz"};if b{o+="Buzz"};if o==""{print(i)};println(o)}}

I wish i had ternary operators...

Source Link

Go, 130 bytes

package main;func main(){for i:=1;i<101;i++{o,a,b:="",i%3<1,i%5<1;if a{o+="Fizz"};if b{o+="Buzz"};if !a&&!b{print(i)};println(o)}}

I wish i had ternary operators...