Created
July 19, 2011 14:59
-
-
Save agentfin/1092663 to your computer and use it in GitHub Desktop.
Ruby Koans about_triangle_project
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
def triangle(a, b, c) | |
if (a == b ) & (b == c ) | |
return :equilateral | |
else | |
if a==b || b==c || c==a | |
return :isosceles | |
else | |
return :scalene | |
end | |
end | |
end | |
class TriangleError < StandardError | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mathtastic!