Tuesday, November 3, 2009

C Program to Calculate Area of Triangle

#include
#include
#include
void main()
{
int a,b,c,s,ar;
printf("enter the value of a,b,c");
scanf("%d,%d,%d",&a,&b,&c);
s=(a+b+c)/2;
ar=sqrt(s*(s-a)*s*(s-b)*s*(s-c));
printf("the area of triangle=%d",ar);
getch();
}

No comments: