//Step 1: Print number 1 to 100
for (int j = 1; j <= 100; j++)
{
string result = "";
//Step 2: Divisible by 3 prints Fizz
if (j % 3 == 0)
{
result = "Fizz ";
}
//Step 3: Divisible by 5 prints Buzz
if (j % 5 == 0)
{
result = result + "Buzz";
}
//Step 4: Divisible by 3 and 5 prints Fizz Buzz
//Step 5: Print number as it is if not divisible by 3 and 5
if (result.Length == 0)
{
result = j.ToString();
}
Console.WriteLine(result);
}