Skip to content

Instantly share code, notes, and snippets.

@mattn
Created March 13, 2015 08:34
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 mattn/8e0f1c2eebfd118720cf to your computer and use it in GitHub Desktop.
Save mattn/8e0f1c2eebfd118720cf to your computer and use it in GitHub Desktop.
using System;
using System.Linq;
class Program
{
static void Main(string[] args)
{
Enumerable.Range(1,100)
.Select(
x =>
x % 15 == 0 ? "FizzBuzz" :
x % 3 == 0 ? "Fizz" :
x % 5 == 0 ? "Buzz" :
x.ToString()
).ToList().ForEach(Console.WriteLine);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment