If you double click on the error message, it will take you to the line that it found teh error on. Look at the error message, and at the code:
Method Name Expected
double areaRaw = perimeter(pSubSidA * pSubSidB * pSubSidC);
There is only one
And
perimeter
is a
double
variable:
double perimeter = (sideA + sideB + sideC) / 2;
not a method, so it looks at your code, sees this:
double variable = aName(parameter list);
and expects aName to be a method. so, it complains: you can't "call" a variable, that doesn't make any sense!
I think you need to go back to basic maths:
Area of a triangle given three sides - Heron's Formula - Math Open Reference[
^]
So, calculate p: (a + b + c)/2
Then area = Sqrt(p * (p - a) * (p - b) * (p -c))
You've calculated p, that's fine - but you need the multiply sign:
double areaRaw = perimeter * (pSubSidA * pSubSidB * pSubSidC);