Today our lesson is about rectangles and triangles.
you will be given as an input an n x n grid that is based on two characters # and * you have to classify it into : triangle or rectangle. where # represents a point and * represents a blank space.
Example input:
#*** ##** ###* #### Output:
triangle Another example
##** ##** ##** ##** Output:
rectangle Rules:
- You should assume that the input is always either a triangle or a rectangle.
- The only two characters you will receive are:
*and#. - Assume that n < 100.
- Be creative, this is a popularity-contest so the most up-voted answer will win.