Alladaskill17 Posted March 11, 2009 Share Posted March 11, 2009 I need help with how to code for a square root.. Suppose to be "Area = Square root of S(S - Length1)(S - Length2)(S - Length3)" I have: if (Area = Math.sqrt(S(S - Length1)(S - Length2)(S - Length3))); Not working as I get multiple errors. ----jGRASP exec: javac -g C:\Documents and Settings\Administrator\My Documents\JAVA\MyTriangle.java MyTriangle.java:42: ')' expected if (Area = Math.sqrt(S(S - Length1)(S - Length2)(S - Length3))); ^ MyTriangle.java:42: not a statement if (Area = Math.sqrt(S(S - Length1)(S - Length2)(S - Length3))); ^ MyTriangle.java:42: ';' expected if (Area = Math.sqrt(S(S - Length1)(S - Length2)(S - Length3))); ^ MyTriangle.java:42: not a statement if (Area = Math.sqrt(S(S - Length1)(S - Length2)(S - Length3))); ^ MyTriangle.java:42: ';' expected if (Area = Math.sqrt(S(S - Length1)(S - Length2)(S - Length3))); ^ 5 errors Double posted, apologies. Double posted, apologies. Link to comment Share on other sites More sharing options...
Question
Alladaskill17
I need help with how to code for a square root..
Suppose to be "Area = Square root of S(S - Length1)(S - Length2)(S - Length3)"
I have:
Not working as I get multiple errors.
Double posted, apologies.
Double posted, apologies.
Link to comment
Share on other sites
0 answers to this question
Recommended Posts