DWITE Online Computer Programming Contest, January 2011, Problem 1
Welcome to the future. Everyone has received their complementary 3D printer and physical objects are trivially created... if you can describe those objects well enough, which does take some time. Being the go-to-computer-person for your entire extended family there have been too many of such requests. Lets automate some of this work. Triangles are a common base shape in many designs, and we want a particular type of such in various sizes.
The input will contain 5 lines, integers , the height of the triangle.
The output will contain 5 ASCII drawings of the triangles, in corresponding heights. The shape of a triangle is something as follows:
..*.. ..*.. .***. .***. *****
Note: all the lines in each test case are equally wide; equal to the width of the base of the triangle.
1 2 3
* * * .*. .*. ***