Giter VIP home page Giter VIP logo

rsha256 / shortest-fizzbuzz Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 26.0 83 KB

Contains shortest solutions to fizzbuzz in various programming languages

Java 3.46% Python 3.91% C++ 7.53% R 3.59% JavaScript 2.12% Go 10.76% Scheme 14.12% Rust 3.75% Ruby 2.25% Swift 15.59% Elm 9.68% Dart 4.04% Raku 1.73% C 3.39% Common Lisp 8.15% PHP 2.25% Haskell 3.68%
hacktoberfest hacktoberfest2020 open-source fizzbuzz hacktober

shortest-fizzbuzz's Introduction

shortest-fizzbuzz

Contains shortest solutions to fizzbuzz in various programming languages


Rules:

"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”." To learn more and see clean versions, see: https://wiki.c2.com/?FizzBuzzTest


Languages:

Contributing:

  1. Alphabetically add your addition here to README.md in the format [<language name>](<file-name>), <number-of-bytes> bytes. GitHub tells you the number of bytes for any file.
  2. Add a file to the root of the repo in the form of: <language-name>.<file-extension> that satisfies the rules above.

Notes:

Try to write a detailed commit message.

If possible make sure you end your file with a newline at the end and are using LF as opposed to CRLF Line sequences.

Feel free to improve on existing solutions if you can do better :)

shortest-fizzbuzz's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

shortest-fizzbuzz's Issues

R solution should be invalidated

Hi, the solution written in R is not really making the fizzbuzz by itself, it imports a package which does it, I think it shouldn't be valid.

Please review it.

I'd be equivalent of making this in another lang:

import fizzbuzz;
fizzbuzz.do();

It makes no sense, the code exists but in another place.

Perl 5 shortest fizzbuzz

Sometime ago I wrote a perl 5 fizzbuzz. In revisiting the challenge have been able to reduce the program size to 51 bytes
warn"Fizz"x!($%3)."Buzz"x!($%5)||$_,$/for 1..100;
Note unlike perl 6, "say" cannot be used to save an extra byte as it is not inbuilt.

The code is also in the attached .txt file
fp51.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.