smithers.extras
Class FizzBuzz

java.lang.Object
  extended by smithers.extras.FizzBuzz

public class FizzBuzz
extends java.lang.Object

Prints the numbers as said in the game of fizzbuzz, known as bizzbuzz in the US.


Constructor Summary
FizzBuzz()
           
 
Method Summary
static void main(java.lang.String[] args)
          Plays fizzbuzz.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FizzBuzz

public FizzBuzz()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Plays fizzbuzz. Prints the numbers 1 to 100, but replaces multiples of 5 and numbers with a digit 5 with "fizz" and multiples of 7 and number with a digit 7 with "buzz".
If a number is given as an argument, this is used as the maximum number instead of 100. If the argument "-penhalagen" is given, replaces multiples of 9 and numbers with a digit 9 with "penhalagen" and switches "fizz" and "buzz" each time this occurs.

Parameters:
args - the arguments, if any
Throws:
java.lang.Exception