Computer Science, asked by louisarushil, 1 year ago

Write the java expression for (a+b)^n

Answers

Answered by theaaravsoni
3

Answer:

(a+3/6-a+5/6-b) this is a java motivation

Answered by AskewTronics
2

Math.pow((a+b),n) is a java expression for the above.

Explanation:

  • The pow function is a function of Math class in java, so when a user wants to use the pow function, then he needs to use the "import java.lang.Math;" in the program.
  • It is because, this will help the compiler to tell about the pow function which is used to find the power of any number whose syntax is Math.pow( first_number, second_number ).
  • The above question wants an expression that will calculate the n power of (a+b), so the expression is "Math.pow((a+b),n)", where a,b and n is a variable whose value must be defined.

Learn More :

  • Java : https://brainly.in/question/13792074

Similar questions