Area Of Triangle Using Math Function in C Tamil


// area of triangle=Root of(s(s-a)(s-b)(s-c))
// 	s=(a+b+c)/2
#include<stdio.h>
#include<conio.h>
#include<math.h>
float area(float a,float b,float c);
void main()
{
	float a,b,c,z;
	clrscr();
	printf("\n Enter the Values of a,b & c :");
	scanf("%f%f%f",&a,&b,&c);
	z=area(a,b,c);		// Function Calling
	printf("\n Area Of Triangle :%.3f",z);
	getch();
}
float area(float a,float b,float c)
{
	float s,m,x;
	s=(a+b+c)/2;
	m=s*(s-a)*(s-b)*(s-c);
	x=sqrt(m);
	return(x);
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming