A C Program to find out the area of triangle by the given equation A=sqrt(s(s-a)(s-b)(s-c)) a,b,c are the sides of triangle and 2s=a+b+c.


#include<stdio.h>
#include<conio.h>

void main()
{
float a,b,c,s,A;
clrscr();
printf("Enter value of a,b,c:");
scanf('%d %d %d"&a ,&b ,&c);
s=(a+b+c)/2;
A=sqrt(s*(s-a)*(s-b)*(s-c));
printf("Area of the triangle is:%f",A);
getch();
}

Comments