WAP to calculate & print area of a triangle.
Answers
Answered by
1
C program to find area of a triangle
int main() { double a, b, c, s, area;
printf("Enter sides of a triangle\n"); scanf("%lf%lf%lf", &a, &b, &c);
s = (a+b+c)/2; // Semiperimeter.
area = sqrt(s*(s-a)*(s-b)*(s-c));
printf("Area of the triangle = %.2lf\n", area
Answered by
1
Please refer to the attachment.
Please note that it is written in Java programming language
Attachments:
Similar questions