-
-
Save profesor79/68669f92b19ed9d6e4534b9cf3ced45b 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
public void FizzBuzz() | |
{ | |
const string FIZZ = "Fizz"; | |
const string BUZZ = "Buzz"; | |
const string FIZZBUZZ = "FizzBuzz"; | |
int i = 0; | |
while (i < 150) | |
{ | |
Console.WriteLine(++i); | |
Console.WriteLine(++i); | |
Console.WriteLine(FIZZ); ++i; | |
Console.WriteLine(++i); | |
Console.WriteLine(BUZZ); ++i; | |
Console.WriteLine(FIZZ); ++i; | |
Console.WriteLine(++i); | |
Console.WriteLine(++i); | |
Console.WriteLine(FIZZ); ++i; | |
Console.WriteLine(BUZZ); ++i; | |
Console.WriteLine(++i); | |
Console.WriteLine(FIZZ); ++i; | |
Console.WriteLine(++i); | |
Console.WriteLine(++i); | |
Console.WriteLine(FIZZBUZZ); ++i; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment