Find the area of triangle using it's sides in c language.

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
  float a,b,c,s,area;
  clrscr();
  printf("enter the sides of triangle =");
  scanf("%f%f%f",&a,&b,&c);
  s=(a+b+c)/2;
  area=sqrt(s*(s-a)*(s-b)*(s-c));
  printf("the area of triangle is =%f",area);
  getch();
}
■》Output->

enter the sides of triangle =>
3
4
5
the area of triangle is =6.000000

Comments

Popular posts from this blog

Introduction of java Programming language.

Stack data structure.