5. On graph paper, a right-angled triangle with legs equal to 7 cells was drawn (see fig.). Then all the grid lines inside the triangle were outlined. What is the maximum number of triangles that can be found in this drawing?
Answer: 28 triangles

Solution: One of the sides of the triangle must go at an

![](https://cdn.mathpix.com/cropped/2024_05_06_a9bd781fd043fb0428ccg-7.jpg?height=362&width=360&top_left_y=2326&top_left_x=1473)
angle, i.e., lie on the segment BC. If we fix some diagonal segment, the remaining vertex is uniquely determined. That is, we need to choose 2 points out of 8, which can be done in $7 \times 8 \backslash 2=28$ ways.