Skip to content

Instantly share code, notes, and snippets.

@Vince0789
Last active March 1, 2021 18:07
Show Gist options
  • Save Vince0789/446d3ef7957c929646a4e99151f615fb to your computer and use it in GitHub Desktop.
Save Vince0789/446d3ef7957c929646a4e99151f615fb to your computer and use it in GitHub Desktop.
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
for (int i = 1; i <= 100; i++)
{
string output = string.Empty;
if (i % 3 == 0)
{
output += "Fizz";
}
if (i % 5 == 0)
{
output += "Buzz";
}
Console.WriteLine((output == string.Empty) ? i.ToString() : output);
}
Console.ReadLine();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment