Skip to content

Instantly share code, notes, and snippets.

@jumboly
Created April 2, 2012 12:17
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 jumboly/2283096 to your computer and use it in GitHub Desktop.
Save jumboly/2283096 to your computer and use it in GitHub Desktop.
FizzBuzz 2012/04/02
using System;
using System.Linq;
class Program {
static void Main() {
foreach (var i in Enumerable.Range(1, 100)) {
var s = "";
if (i % 3 == 0) s += "Fizz";
if (i % 5 == 0) s += "Buzz";
if (s == "") s += i;
Console.WriteLine(s);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment