Problem Description
This day the teacher again to small Hao out a topic: give you three lengths, respectively, A,b,c match, let you calculate the three matches can make up of the Triangle area.
Input
Enter each row to include three number a,b,c.
Output
The area of the output triangle for each row (reserved three decimal places), cannot be composed of triangles told the small Hao output "no!".
Sample Input
1 2 33) 4 5
Sample Output
no!6.000
HINT
1#include <stdio.h>2#include <math.h>3 intMain ()4 {5 Doubles,a,b,c,p;6 while(SCANF ("%LF%LF%LF", &a,&b,&c)! =EOF)7 {8 if(a+b>c&&a+c>b&&c+b>a)9 {Tenp= (A+B+C)/2; Onep=p* (P-A) * (p-b) * (P-c); As=sqrt (p); -printf"%.3lf\n", s); - } the Elseprintf"no!\n"); - - } - + return 0; -}
Wuhan University of Science and Technology acm:1004: Chinese Edition C language Programming tutorial (second Edition) Exercise 5.6