3. Given a triangle with three sides of positive integer lengths. If only one side length is 5, and it is not the shortest side, then the number of triangles that satisfy the condition is ( ).
(A) 4
(B) 6
(C) 8
(D) 10
3.D.

If 5 is the longest side, the side lengths of the triangles that satisfy the conditions are
$$
2,4,5 ; 3,4,5 ; 3,3,5 ; 4,4,5 \text {. }
$$

If 5 is the second longest side, the side lengths of the triangles that satisfy the conditions are
$$
2,5,6 ; 3,5,6 ; 3,5,7 ; 4,5,6 ; 4,5,7 ; 4,5,8 \text {. }
$$