using System;
public class Program
{
//You have a collection of numbers 1 to 100
//I want you to cycle through this collection and output the following:
//If the number is evenly divisible by 3, print the number and only the word "Fizz"
//If the number is evenly divisible by 5, print the number and only the word "Buzz"
//For each number that is evenly divisible by both 3 and 5, print the number and only "FizzBuzz"
//If the number is not divisible by any of the above, print the number
public static void Main()
FizzBuzz();
}
static void FizzBuzz()
for (int i = 1; i <= 100; i++)
if (i % 15 == 0)
Console.WriteLine(i);
Console.WriteLine("FizzBuzz");
else if (i % 3 == 0)
Console.WriteLine("Fizz");
else if (i % 5 == 0)
Console.WriteLine("Buzz");
else