Last active
March 1, 2021 18:07
-
-
Save Vince0789/446d3ef7957c929646a4e99151f615fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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