-
-
Save profesor79/cdab87d9d7e51f3fceffe8ab86413c51 to your computer and use it in GitHub Desktop.
no if no IF it is possible
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 class _null | |
{ | |
private static string[] _dividers3 = new string[] { "f", string.Empty, string.Empty }; | |
private static string[] _dividers5 = new string[] { "bu", string.Empty, string.Empty, string.Empty, string.Empty }; | |
private static string[] _results = new string[] { "", "fizz", "buzz", "fizzbuzz" }; | |
public string FizzBuzz(int i) | |
{ | |
_results[0] = i.ToString(); | |
return _results[(_dividers3[i % 3] + _dividers5[i % 5]).Length]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment