Describe
Given the length of the three segments, determine if the three segments can form a triangle. If it is able to make up, calculate its area.
The input input has only one row and contains three floating-point numbers, each representing the edge length of the triangle's three sides, separated by a space between the number and the number. Outputs the area of the triangle, preserving 4 decimal places, for situations that can form triangles.
For cases where a triangle cannot be formed, output "Data Error". Sample input
3 4 5
Sample output
6.0000
1#include <stdio.h>2#include <math.h>3 intMain ()4 {5 Doublea,b,c,p;6 Doubles;7scanf"%LF%LF%LF",&a,&b,&c);8p= (A+B+C)/2;9 if(a+b<=c| | b+c<=a| | a+c<=b)Tenprintf"Data error\n"); One Else A { -S=sqrt (p* (p-a) * (p-b) * (P-c)); -printf"%.4lf\n", s); the } - return 0; -}
1-3-17: To seek the triangular area with the edge length