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
//returns 3 if divisible by 3, 5 if divisible by 5, and 0 if neither and 10 if both | |
int fizzBuzz(int num) { | |
int temp; | |
if(num%3 == 0) | |
temp = 3; | |
if(num%5 == 0) | |
temp += 5; | |
if(temp == 3) | |
return temp; | |
else if(temp == 5) |
NewerOlder