Computer Science, asked by laharisandhya9880, 3 months ago

write the java expresion for x = 3√a^3 + b^4

Answers

Answered by BrainlyProgrammer
1

Your question might means

Java expression for:-

x = 3 \sqrt{ {a}^{3} }  +  {b}^{4}

Answer:-

There are two ways:

  1. x=3*Math.sqrt(Math.pow(a,3))+ Math.pow(b,4);
  2. x=3*Math.sqrt(a*a*a)+ b*b*b*b;

---------------------Or------------------------

Java Expression for:-

x = 3 \sqrt{ {a}^{3} +  {b}^{4} }

Answer:-

There are two ways:

  1. x=3*(Math.sqrt(Math.pow(a,3)+Math.pow(b,4));
  2. x=3*Math.sqrt((a*a*a)+(b*b*b*b));

___________________

NOTE:-

  • Math.sqrt() is used for finding square root
  • Math.pow() is for finding {n}^{x}
  • Both Math.pow() and Math.sqrt() returns double data type value

More math function:-

  • Math.min()- To find minimum of 2 numbers
  • Math.max()- To find maximum of two numbers
  • Math.cbrt()- To find cube root of a number
  • Math.ceil()- Rounds the number upto next higher integer.
  • Math.floor()- Rounds the number to next lower integer
  • Math.round()
  • Math.random()- To find the random numbers between 0 and 1
Similar questions