Created
June 6, 2015 06:20
-
-
Save RyanBreaker/80ae9fcb1dd52d8315c7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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