P21791 [GeeksforGeeks] Area of a triangle5739
普及-
题目描述

Given three sides of a triangle A, B and C in the form of integers. Find the area of the triangle.
Note: The triangle may not exist. In such cases, the area is 0.
Example 1:
Input: A = 2, B = 2, C = 3
Output: 1.984313
Explanation:
The area formed by the triangle whose
sides are 2,2 and 3 units respectively is
1.984313 units^{2}.
Example 2:
Input: A = 1, B = 3, C = 1
Output: 0.000
Explanation:
Such a triangle does not exist whose
sides are 1,3 and 1 respectively.Thus,Area is
0.
Your Task:
You don't need to read input or print anything.Your Task is to complete the function findArea() which takes three integers A,B and C as input parameters and returns the area of the triangle formed by the three integers as sides.
Note: Output the answer upto 3 decimal points
Expected Time Complexity:O(1)
Expected Auxillary Space:O(1)
Constraints:
1<=A,B,C,<=10^{4}

输入格式

见题面

输出格式

见题面

样例输入
A = 2, B = 2, C = 3
样例输出
1.984313