Created
March 22, 2014 23:21
-
-
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...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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