Skip to content

Instantly share code, notes, and snippets.

@jumboly
Created March 28, 2012 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jumboly/2225889 to your computer and use it in GitHub Desktop.
Save jumboly/2225889 to your computer and use it in GitHub Desktop.
FizzBuzz 2012/03/28
using System;
class Program {
static void Main(string[] args) {
for (int i = 1; i < 100; i++) {
if (i % 3 == 0 && i % 5 == 0) Console.WriteLine("FizzBuzz");
else if (i % 3 == 0) Console.WriteLine("Fizz");
else if (i % 5 == 0) Console.WriteLine("Buzz");
else Console.WriteLine(i);
}
}
}
@jumboly
Copy link
Author

jumboly commented Mar 28, 2012

まずはオーソドックスなやつ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment