hi, i have written a program to find area of triangle, but i meet some errors, i can not fix this error, kindly help me to fix the error. thanks.
//******area of triangle******//
#include<iostream>
using namespace std;
float trianglearea (float a, float b, float c, float d)
{
float r=a*b*c*d;
float x = r;
float y = 1;
while (y*y<=x)
{
y=y+1;
}
y=y-1;
cout<<y;
float result;
result=y;
return (result);
}
int main()
{
float a, b, c;
cout<<"enter first side of triangle: ";
cin>>a;
cout<<"enter second side of triangle: ";
cin>>b;
cout<<"enter third side of triangle: ";
cin>>c;
float s=(a+b+c)/2;
float d=s-a;
float e=s-b;
float f=s-c;
float area_triangle = trianglearea (s*d*e*f);
cout<<area_triangle;
return 0;
}