Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

50%
+0 −0
Challenges 1, 2, Fizz, 4, Buzz!

PHP, 114 bytes <?php for($i=1;$i<101;$i++){if($i%3!=0&$i%5!=0){echo$i;}if($i%3==0){echo"Fizz";}if($i%5==0){echo"Buzz";}echo"\n";} Try it online! As someone who doesn't code much in...

posted 3y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

Answer
#3: Post edited by user avatar General Sebast1an‭ · 2021-09-10T09:13:33Z (over 3 years ago)
  • # [PHP], 116 bytes
  • <!-- language-all: lang-php -->
  • <?php for($i=1;$i<101;$i++){if($i%3!=0&$i%5!=0){echo$i;}if($i%3==0){echo"Fizz";}if($i%5==0){echo"Buzz";}echo"
  • ";}?>
  • [Try it online!][TIO-kte55idq]
  • As someone who doesn't code much in <s>Philippine Peso</s> this language, it was tricky.
  • [PHP]: https://php.net/
  • [TIO-kte55idq]: https://tio.run/##K8go@P/fxr4go0AhLb9IQyXT1tBaJdPG0ABEaWtrVmemAQVVjRVtDdSAtCmQ1qxOTc7IV8m0roXK2cLElNwyq6qUYOKmCHGnUrA4mB2TB2TZ2/3/DwA "PHP – Try It Online"
  • # [PHP], 114 bytes
  • <!-- language-all: lang-php -->
  • <?php for($i=1;$i<101;$i++){if($i%3!=0&$i%5!=0){echo$i;}if($i%3==0){echo"Fizz";}if($i%5==0){echo"Buzz";}echo"
  • ";}
  • [Try it online!][TIO-kte56mnc]
  • As someone who doesn't code much in <s>Philippine Peso</s> this language, it was tricky.
  • [PHP]: https://php.net/
  • [TIO-kte56mnc]: https://tio.run/##K8go@P/fxr4go0AhLb9IQyXT1tBaJdPG0ABEaWtrVmemAQVVjRVtDdSAtCmQ1qxOTc7IV8m0roXK2cLElNwyq6qUYOKmCHGnUrA4mB2TB2T9/w8A "PHP – Try It Online"
#2: Post edited by user avatar General Sebast1an‭ · 2021-09-10T09:12:49Z (over 3 years ago)
  • # [PHP], 117 bytes
  • <!-- language-all: lang-php -->
  • <?php for($i=1;$i<101;$i++){if($i%3!=0&$i%5!=0){echo $i;}if($i%3==0){echo"Fizz";}if($i%5==0){echo"Buzz";}echo"
  • ";}?>
  • [Try it online!][TIO-kte53t38]
  • As someone who doesn't code much in <s>Philippine Peso</s> this language, it was tricky.
  • [PHP]: https://php.net/
  • [TIO-kte53t38]: https://tio.run/##K8go@P/fxr4go0AhLb9IQyXT1tBaJdPG0ABEaWtrVmemAQVVjRVtDdSAtCmQ1qxOTc7IV1DJtK6FStrCBJXcMquqlGDipghxp1KwOJgdkwdk2dv9/w8A "PHP – Try It Online"
  • # [PHP], 116 bytes
  • <!-- language-all: lang-php -->
  • <?php for($i=1;$i<101;$i++){if($i%3!=0&$i%5!=0){echo$i;}if($i%3==0){echo"Fizz";}if($i%5==0){echo"Buzz";}echo"
  • ";}?>
  • [Try it online!][TIO-kte55idq]
  • As someone who doesn't code much in <s>Philippine Peso</s> this language, it was tricky.
  • [PHP]: https://php.net/
  • [TIO-kte55idq]: https://tio.run/##K8go@P/fxr4go0AhLb9IQyXT1tBaJdPG0ABEaWtrVmemAQVVjRVtDdSAtCmQ1qxOTc7IV8m0roXK2cLElNwyq6qUYOKmCHGnUrA4mB2TB2TZ2/3/DwA "PHP – Try It Online"
#1: Initial revision by user avatar General Sebast1an‭ · 2021-09-10T09:12:03Z (over 3 years ago)
# [PHP], 117 bytes

<!-- language-all: lang-php -->

    <?php for($i=1;$i<101;$i++){if($i%3!=0&$i%5!=0){echo $i;}if($i%3==0){echo"Fizz";}if($i%5==0){echo"Buzz";}echo"\n";}?>

[Try it online!][TIO-kte53t38]

As someone who doesn't code much in <s>Philippine Peso</s> this language, it was tricky.

[PHP]: https://php.net/
[TIO-kte53t38]: https://tio.run/##K8go@P/fxr4go0AhLb9IQyXT1tBaJdPG0ABEaWtrVmemAQVVjRVtDdSAtCmQ1qxOTc7IV1DJtK6FStrCBJXcMquqlGDipghxp1KwOJgdkwdk2dv9/w8A "PHP – Try It Online"