Home > Back-end >  Want to use it for three inputs the triangle area, but teacher program crash...
Want to use it for three inputs the triangle area, but teacher program crash...

Time:10-01

#include
#include
Int main ()
{
Double a, b, c, s, p, area;
Printf (" do input three number: \ n ");
The scanf (" % f % f % f ", a, b, c);
S=(a + b + c)/2;
P=s * (s - a) * (s - b) * (s - c);
Area=SQRT (p);
Printf (" the three edge are: \ na=% f \ nb=% f \ nc=f ", a, b, c);
Printf (" the area is: area=% f ", area);
return 0;
}

CodePudding user response:

 
The scanf (" % f % f % f ", & amp; A, & amp; B, & amp; C);
  • Related