Write down java expression for:
√a2 + b2
Answers
Answered by
12
Question:-
Write the Java expression for the following.
Answer:-
Given expression,
The Java expression for the following is,
Math.sqrt(a*a + b*b);
Or,
Math.sqrt(Math.pow(a,2)+Math.pow(b,2));
Better to write Math.sqrt(a*a+b*b) as it takes less time to write.
Math.sqrt() is used to calculate the square root of any positive number.
Answered by
4
Similar questions