Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 1.42 KB

README.md

File metadata and controls

23 lines (15 loc) · 1.42 KB

fizzbuzz

Written in Python, C#, & Java

by Randall Arms @ randallarms.com

Summary

Iterate through a set of integers and print "Fizz" if equally divisible by 3, "Buzz" if equally divisible by 5, or "FizzBuzz" if equally divisible by both 3 and 5.

Instructions

When prompted, type in the total number of integer iterations desired and hit enter.

Note: If the number is greater than a thousand then a confirmation will be requested. Type "yes" and hit enter to continue.

You will then be prompted first for the "Fizz" divisor and then for the "Buzz" divisor. To get the traditional results, enter "3" and then "5"; however, any positive integer may be used in their place.

The program should then iterate through each integer from 1 to the number selected, inclusive.

Note: More options will be added soon, such as for starting from a selected integer.

About

This project is a personal spin on the popular programming exercise based on the children's game of the same name. For now, the program is written in Python (fizzbuzz.py), C# (FizzBuzz.cs), & Java (FizzBuzz.java); more alternatives may be added in the future.

A minimal version of the code can be found in the files ending with "-short", which generates the traditional FizzBuzz set from 1 to 100 in as few code characters as possible.

Currently, the short Python code contains fewer than 150 characters, and the short C# code contains fewer than 250 characters.