Saturday, August 20, 2011

Program to find area of triangle.

//Program to find area of triangle.
#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
float a,b,c,p,ar,s;
clrscr();
printf("Enter the values of three sides of triangle:");
scanf("%f%f%f",&a,&b,&c);
p=a+b+c;
s=p/2;
ar=sqrt(s*(s-a)*(s-b)*(s-c));
printf("\n The area of triangle is=%f",ar);
getch();
}

Previous Next Home
0 Comments
Comments

Leave a Comment

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Twitter Delicious Facebook Favorites More