Add code in triangle.rb to pass initial tests in triangle_spec.rb