Created
April 7, 2011 21:48
-
-
Save follesoe/908819 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
| public void FizzBuzz(int number) | |
| { | |
| // return FizzBuzz if Divisible by three and five | |
| if(number % 3 == 0 && number % 5 == 0) | |
| return "FizzBuzz"; | |
| return number; | |
| } | |
| public void FizzBuzz(int number) | |
| { | |
| if(IsDivisibleByTheeAndFive(number)) | |
| return "FizzBuzz"; | |
| return number; | |
| } | |
| private bool IsDivisibleByTheeAndFive(number) | |
| { | |
| return number % 3 == 0 && number % 5 == 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment