perimeter of a triangle formula and example