Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace FizzBizz
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             Enumerable.Range(1,100).ToList().ForEach(
  13.                 n => Console.WriteLine((n%3==0) ? (n%5==0) ? "FizzBuzz" : "Fizz" : (n%5==0) ? "Buzz" : n.ToString()));
  14.      
  15.             Console.ReadKey();
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement