# C Program to find area of triangle using Heron’s Formula

Write a Program in C programming language to find the area of triangle using Heron’s formula. Below is the code of the C program –

```/* C program to find area of trianlge using Heron's formula */

#include<stdio.h>
#include<math.h>
void main()
{
float a,b,c,s=0,area=0;

printf("Enter the length of sides of triangle \n");
scanf("%f %f %f",&a,&b,&c);

s = (a+b+c)/2.0; /* s is semi-perimeter */
area = (sqrt)(s*(s-a)*(s-b)*(s-c));

printf("Area of triangle =\t %f",area);
getch();
}
```

Input –
a = 6
b = 4
c = 5

Output-

Area of triangle = 9.9215

#### 5 thoughts on “C Program to find area of triangle using Heron’s Formula”

1. Kacey says:

I see a lot of interesting articles on your website.
You have to spend a lot of time writing, i know how to save you a lot of work, there is a tool that creates unique,
google friendly posts in couple of seconds, just type in google – laranita’s free content source

2. Ted says:

I read a lot of interesting content here.
Probably you spend a lot of time writing, i know how to save you a lot of
time, there is an online tool that creates unique, google friendly posts in seconds, just search in google – laranitas free content

3. Tarun Sharma says:

i have opted for B.Ca ,i am in 1st sem, i am From Punjab>Amritsar , dis article helped me , i am new to c,i am thankful to u .
14/08/2016 23:31

4. Bhawana Soni says:

Thnx to this whole team….
๐๐

5. Abasido says:

Wow #nice work there keep it up!!!ยกยกยฟ