Exercism: Go version of the 'Triangle' exercise.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jimi 56d891f4c1 Standardized package comment, correct Sca logic 9 years ago
README.md Initial commit 9 years ago
triangle.go Standardized package comment, correct Sca logic 9 years ago
triangle_test.go Initial commit 9 years ago

README.md

Triangle

Write a program that can tell you if a triangle is equilateral, isosceles, or scalene.

The program should raise an error if the triangle cannot exist.

Tests are provided, delete one skip at a time.

Hint

The sum of the lengths of any two sides of a triangle always exceeds the length of the third side, a principle known as the triangle inequality.

To run the tests simply run the command go test in the exercise directory.

If the test suite contains benchmarks, you can run these with the -bench flag:

go test -bench .

For more detailed info about the Go track see the help page.

Source

The Ruby Koans triangle project, parts 1 & 2 view source