Last active
March 12, 2017 03:52
-
-
Save marclerodrigues/31ef7d1507d8c829ed413d816d050716 to your computer and use it in GitHub Desktop.
Submission test for Pegcar
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
(1..100).map do |n| | |
n | |
"Pegcar" if remainder_zero?(n, 35) | |
"car" if remainder_zero?(n, 7) | |
"Peg" if remainder_zero?(n, 5) | |
end | |
def remainder_zero?(a, b) | |
a % b == 0 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment