Created
December 1, 2015 16:46
-
-
Save scottfirestone/a4d41579babd51b72994 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
def superfizzbuzz | |
0.upto(1000).each do |num| | |
if (num % 7 ==0) && (num % 5==0) && (num % 3==0) | |
puts "SuperFizzBuzz" | |
elsif (num % 7 ==0) && (num % 3==0) | |
puts "SuperFizz" | |
elsif (num % 7 ==0) && (num % 5==0) | |
puts "SuperBuzz" | |
elsif num % 3 ==0 | |
puts "Fizz" | |
elsif 3==0 | |
puts "Buzz" | |
elsif num % 7 ==0 | |
puts "Super" | |
else | |
puts num | |
end | |
end | |
end | |
superfizzbuzz() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment