Computer Science, asked by kuldeepsachdev3540, 6 months ago

Write java expression of A2+b3+c4

Answers

Answered by anindyaadhikari13
5

Question:-

Write the java expression for the following.

Answer:-

Given expression,

 \sf {a}^{2}  +  {b}^{3}  +  {c}^{4}

The java expression for the following will be,

Math.pow(a, 2)+Math.pow(b,3)+Math.pow(c,4);

Math.pow(x, y) is used to return x raised to the power y. Resultant data type will be double always.

Answered by Oreki
2

\textsf{\large Given Expression}

    a^{2} + b^{3} + c^{4}

\textsf{\large Java Expression}

    \texttt{a * a + b * b * b + c * c * c * c;}

Similar questions