public class DotNetPad
{
    public static void Main(string[] args)
    {
var i = Expression.Parameter(typeof(int), "i");
var label = Expression.Label(typeof(void));
Expression.Lambda<Action>(Expression.Block(
    new[] { i },
    Expression.Loop(
        Expression.Block(

Pasted 322 days ago

public class Default {
    public static void Main(string[] args) {
        var f = new Func<int, object>[] {
            i=> "FizzBuzz", i=> i, i=> i, i=> "Fizz", i=> i,
            i=> "Buzz", i=> "Fizz", i=> i, i=> i, i=> "Fizz", 
            i=> "Buzz", i=> i, i=> "Fizz", i=> i, i=> i
        };
        foreach (var x in Enumerable.Range(1, 100).Select(i => f[i % 15](i))) {
            Console.WriteLine(x);
        }

Pasted 392 days ago


Pasted 421 days ago

class DotNetPad{static void Main(string[] args){System.Console.WriteLine(string.Join(System.Environment.NewLine,Enumerable.Range(1,100).Select(n=>n%15==0?"FizzBuzz":n%5==0?"Buzz":n%3==0?"Fizz":n.ToString())));}}

Pasted 421 days ago

public class Default {
    public static void Main(string[] args) {
        var f = new Func<int, object>[] {
            i=> "FizzBuzz", i=> i, i=> i, i=> "Fizz", i=> i,
            i=> "Buzz", i=> "Fizz", i=> i, i=> i, i=> "Fizz", 
            i=> "Buzz", i=> i, i=> "Fizz", i=> i, i=> i
        };
        foreach (var x in Enumerable.Range(1, 100).Select(i => f[i % 15](i))) {
            Console.WriteLine(x);
        }

Pasted 530 days ago

public class Default
{
    public static void Main(string[] args)
    {
         Array.ForEach<string>((from i in Enumerable.Range(1, 100)
                                select i % 15 == 0 ? "FizzBuzz" :
                                       i % 3 == 0  ? "Fizz" :
                                       i % 5 == 0 ? "Buzz" : i.ToString()).ToArray(), 
                                s => Console.Out.WriteLine(s));   
    }

Pasted 803 days ago

public class Default
{
    public static void Main(string[] args)
    {
         Array.ForEach<string>((from i in Enumerable.Range(1, 100)
                                select i % 15 == 0 ? "FizzBuzz" :
                                       i % 3 == 0  ? "Fizz" :
                                       i % 5 == 0 ? "Buzz" : i.ToString()).ToArray(), 
                                s => Console.Out.WriteLine(s));   
    }

Pasted 943 days ago

public class Default
{
    public static void Main(string[] args)
    {
        for (var i = 1; i <= 100; ++i) {
            var output = "";
            if (i % 3 == 0) output += "Fizz";
            if (i % 5 == 0) output += "Buzz";
            Console.WriteLine(string.IsNullOrEmpty(output) ? i.ToString() : output);
        }

Pasted 991 days ago

namespace FizzBuzz_State_Machine
{
    class Program
    {
        static void Main(string[] args)
        {
            Node node = new N(0);
            while (node != null) node = node.NextNode();
            Console.ReadLine();
        }

Pasted 1065 days ago

namespace FizzBuzz_State_Machine
{
    class Program
    {
        static void Main(string[] args)
        {
            Node node = new Increment(0);
            while (node != null) node = node.NextNode();
            Console.ReadLine();
        }

Pasted 1065 days ago

public class Default
{
    public static void Main(string[] args)
    {
        Func<int, string>[] selectors = {
            x => x % 3 == 0 && x % 5 == 0 ? "FizzBuzz" : null,
            x => x % 3 == 0 ? "Fizz" : null,
            x => x % 5 == 0 ? "Buzz" : null,
            x => x.ToString()
        };

Pasted 1101 days ago

public class Default
{
    public static void Main(string[] args)
    {
        for(int i = 1; i <= 100; i++)
        {
            if(i % 3 == 0 && i % 5 == 0)
            {
                Console.WriteLine("FizzBuzz");
            }

Pasted 1101 days ago

public class Default
{
    public static void Main(string[] args)
    {
        for (int i=1; i<=100; i++) {
            if (i % 15 == 0) Console.WriteLine("FizzBuzz");
            else if (i % 3 == 0) Console.WriteLine("Fizz");
            else if (i % 5 == 0) Console.WriteLine("Buzz");
            else Console.WriteLine(i);
        }

Pasted 1132 days ago

public class Default {
    public static void Main(string[] args) {
        bool flag = false;
        for (int i = 1; i <= 100; i++) {
            flag = true;
            if (i % 3 == 0) { Console.Write("Fizz"); flag = false; }
            if (i % 5 == 0) { Console.Write("Buzz"); flag = false; }
            if (flag) Console.Write(i.ToString());
            Console.Write("\r\n");
        }

Pasted 1265 days ago

public class Default
{
    public static void Main(string[] args)
    {
        for (int i = 1; i <= 100; i++)
        {
            string buffer = "";
            if (i % 3 == 0)
            {
                buffer += "Fizz";

Pasted 1265 days ago