|@Rahul Jadhav 1||458|
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.
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 units2.
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.
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)
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?Yes