Skip to content

Instantly share code, notes, and snippets.

@RyanBreaker
Created June 6, 2015 06:20
Show Gist options
  • Save RyanBreaker/80ae9fcb1dd52d8315c7 to your computer and use it in GitHub Desktop.
Save RyanBreaker/80ae9fcb1dd52d8315c7 to your computer and use it in GitHub Desktop.
namespace FizzBuzz
{
public class Program
{
public static void Main(string[] args)
{
string s;
for(int i = 1; i <= 100; i++)
{
s = "";
if(i % 3 == 0)
s += "Fizz";
if( i % 5 == 0)
s += "Buzz";
System.Console.WriteLine(s == "" ? i.ToString() : s);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment