Skip to content

Instantly share code, notes, and snippets.

@damonjmurray
Created March 22, 2014 23:21
Show Gist options
  • Save damonjmurray/9715976 to your computer and use it in GitHub Desktop.
Save damonjmurray/9715976 to your computer and use it in GitHub Desktop.
A 'golf' attempt at FizzBuzz using the ternary operator with some code formatting left in-tact...
using c=System.Console;
class P
{
static void Main()
{for(int i=1;i<101;i++)c.WriteLine(i%15==0?"FizzBuzz":i%5==0?"Buzz":i%3==0?"Fizz":i+"");c.ReadKey();}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment