THE EXERCISE OF THE GUYS GUYS HAS BEEN MOVED TO THE MENU "EXERCISE OF Teacher"

triangle

Threads: Write a program to 3 number a, b, c. Check if a, b, c Is 3 edge of the triangle is not? If 3 edge of the triangle, the triangle area calculation formula: S = \sqrt{p(p-a)(p-b)(p-c)} where p is half the perimeter of the triangle. p = \frac{a+b+c}{2}
Input: A line of 3 numbers separated by spaces.
Output:
1/ If 3 forming triangular edges, print out a line of 2 numbers separated by a space are the perimeter and area of ​​triangles. Rounded to 2 decimal.
2/ If 3 not forming triangular edges, printed word “NO”.

For example:

input:
3 4 5
output:
12.00 6.00

You are not logged in? Log in to Submit Now!

22 Comments

Add a Comment