Computer Science, asked by asmitagodiyal74, 6 months ago

write the following expression in java i. a^2+b^2.
pmease dont spam.​

Answers

Answered by Oreki
1

Answer:

I. a * a + b * b

OR

Math.pow(a, 2) + Math.pow(b, 2)

Answered by anindyaadhikari13
2

\star\:\:\:\sf\large\underline\blue{Question:-}

  • Write the java expression for the following.

\star\:\:\:\sf\large\underline\blue{Answer:-}

Given expression,

 \sf {a}^{2}  +  {b}^{2}

This can be done in two ways

First way,

We can use multiplication operator for this expression

a*a + b*b

Second way,

We can use math function.

Math.pow(a, 2)+Math.pow(b,2)

Similar questions