Math, asked by goelvansh9895, 1 year ago

You are given three integers say a, p and
a. You are asked to find the number of possible triangles with one side a, such that the perimeter is equal to p

Answers

Answered by AwesomeSoul47
5

Answer:

Hey mate here is your answer......

Input: P = 12

Output: number of right triangles = 1

The only right angle possible is with sides

hypotenuse = 5, perpendicular = 4 and base = 3.

Input: p = 840

Output: number of right triangles = 8

Recommended: Please try your approach on {IDE} first, before moving on to the solution.

So the aim is to find the number of solutions which satisfy equations a + b + c = p and a2 + b2 = c2.

hope it's helpful for you.

Attachments:
Similar questions