C Lang: Program to calculate Area of Triangle using HERON's Formula.
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int a, b, c;
float s, Area;
clrscr();
printf("Enter side 1= ");
scanf("%d",&a);
printf("Enter side 2= ");scanf("%d",&b);
printf("Enter side 3= ");
scanf("%d",&c);
s=(a+b+c)/2;
Area=sqrt(s*(s-a)*(s-b)*(s-c));
printf("Area is %f",Area);
getch();
}
Please Visit: www.lovebookessence.blogspot.com
Please Visit: www.lovebookessence.wordpress.com
Facebook Page: fb.me/mohitsinghkush700
Comments
Post a Comment