Tallying triangles


Suppose you're given a text file that contains 3 lengths in each line. The file claims to represent a list of triangles, however, you speculate that some may not be triangles.

Write code to read in the text file, and count up the number of valid triangles in the file.


Access restricted

Subscribe to premium account to see the solution.

Get premium now