Sunday, 15 January 2012

Program To Find Area of Traingle Using Function In C++

#include<iostream.h>
#include<conio.h>
#include<math.h>
void sum(int x,int y,int z);
main()
{
clrscr();
float a,b,c,m,n,area;
cout<<"enter numbers=";
cin>>a>>b>>c;
sum(a,b,c);
getch();
}
void sum(int x,int y,int z)
{
float m,n;
m=(a,b,c/2);
area=sqrt(s*(s-a)*(s-b)*(s-c));

cout<<area;
}

No comments:

Post a Comment