Computer Science, asked by shadowkingt0321, 1 month ago

Write java expression: p= (a2
+b3
)

Answers

Answered by BrainlyProgrammer
3

Answer:

Java expression for:

 \:  \:  \:  \:  \:  \:  \:  \:  \:  \:  \:  \:  \:  \boxed { \red{\boxed{\orange{\bold{\tt p =  {a}^{2}  +  {b} ^{3}}}}}}

  • Two ways to write it...
  1. p=(a*a) +(b*b*b) ;
  2. p=Math.pow(a, 2) +Math.pow(b,3);

Remember:-

  • Pow() returns in double and is used for number raised to power other number
Answered by Oreki
1

\textsf{\large Given Expression}

    p = (a^2 + b^3)

\textsf{\large Java Expression}

    \texttt{p = a * a + b * b * b;}

Similar questions