You can put this solution on YOUR website! If we have a right triangle, (a triangle with a right angle) we can use Pythagoreans theorem:
Where a and b are the legs of the triangle and c is the hypotenuse (the diagonal). So if a triangle has legs of 3 and 4 we plug them into Pythagoreans theorem
So if I have legs of 3 and 4, I will have a diagonal of 5.