Write a c program to find area of triangle ,when known are the lengths of all three of its side
Answers
Answered by
0
simply use a double or decimal variable and use the √ function and use heron's formulae.. if i give you the codes.. it will be useless.
Answered by
0
void main()
{
int a,b,c,s,ar;
printf("Enter 3 sides");
scanf("%d%d%d",&a,&b,&c);
s=(a+b+c)/2;
ar=sqrt(s*(s-a)*(s-b)*(s-c));
printf("Area = %d",ar);
}
{
int a,b,c,s,ar;
printf("Enter 3 sides");
scanf("%d%d%d",&a,&b,&c);
s=(a+b+c)/2;
ar=sqrt(s*(s-a)*(s-b)*(s-c));
printf("Area = %d",ar);
}
Similar questions
Environmental Sciences,
7 months ago
Math,
7 months ago
Science,
7 months ago
Business Studies,
1 year ago
Social Sciences,
1 year ago
Math,
1 year ago
Math,
1 year ago