Skip to content

Instantly share code, notes, and snippets.

@AdamLJohnson
Created August 6, 2012 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamLJohnson/3271277 to your computer and use it in GitHub Desktop.
Save AdamLJohnson/3271277 to your computer and use it in GitHub Desktop.
My FizzBuzz Test
private static string FizzBuzz(int i)
{
if ((i % 3 == 0) && (i % 5 == 0)) return "FizzBuzz";
else if (i % 3 == 0) return "Fizz";
else if (i % 5 == 0) return "Buzz";
else return i.ToString();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment