Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

include<iostream> #include<cmath> using namespace std; //listing all function he

ID: 3615166 • Letter: I

Question

include<iostream>
#include<cmath>
using namespace std;
//listing all function here before main
void name()
{cout<<"My name is Roy Acaba ";}
void invalid()
{cout<<"Data is Invalid please try again";}
void sides(int&s1,int&s2,int&s3)
{cout<<"Please enter a value for for the first side ";
cin>>s1;
cout<<"Please enter a value for the second side ";
cin>>s2;
cout<<"Please enter a value for the third side ";
cin>>s3;}
double areaequaltri(int s)
{double area=0;
area=((sqrt(3))/4)*pow(s,2.0);
return area;}
void sayequal()
{cout<<"This is an equilateral triangle ";}
double arearegtri(double&s1,double&s2,double&s3,doublearea,double p)
{p=(s1+s2+s3)/2;
area=sqrt(p*(p-s1)*(p-s2)*(p-s3));
return area;}
int main()

{int s1,s2,s3;
double p,area;
name();
sides(s1,s2,s3);
if (s1<0||s2<0||s3<0)
invalid();
else if(s1==s2&&s2==s3)
{area=areaequaltri(s1);
sayequal();}
else
arearegtri(s1,s2,s3,area,p);

system("pause");
return 0;
}

getting 2 small errors and cant figure out what Im doing wrong

Explanation / Answer

please rate - thanks your mixing your types. your sides were double 1 place, intanother. you had a function named perim and a variable in function perimnames perim, confusing space thing out - makes it easier to read #include #include using namespace std; //listing all function here before main void name() {cout