19 lines
395 B
C
19 lines
395 B
C
#include <math.h>
|
|
#include <stdio.h>
|
|
|
|
int main(void) {
|
|
// Initialize values
|
|
int a, b, c;
|
|
scanf("%i %i %i", &a, &b, &c);
|
|
|
|
// Calculate S and area's 2 power
|
|
double s = (a + b + c) / (double)2;
|
|
double area = (s * (s - a) * (s - b) * (s - c));
|
|
|
|
// Print answer
|
|
(area > 0) ? printf("%.3lf", sqrt(area))
|
|
: printf("The edges cannot make up of a triangle.");
|
|
|
|
return 0;
|
|
}
|