Computer Science, asked by vansseekhaojha56, 28 days ago

write the java expression for​

Attachments:

Answers

Answered by Oreki
3

\textsf{\large \textbf{Given Expression}}

   a = \sqrt[3]{x^2 + 3y - z}

\textsf{\large \textbf{Java Expression}}

   \texttt{a = Math.cbrt(x * x + 3 * y - z)}

Answered by SƬᏗᏒᏇᏗƦƦᎥᎧƦ
3

\underline{\large{\sf{Question:}}}

  • \large{\tt{a \:  =  \:  \sqrt[3]{x {}^{2} \:  + \:  3y  \: -  \: z } }}

\underline{\large{\sf{Required \: Answer:}}}

  • Here we would be only using Math.cbrt method because of the cube root.

\red \bigstar \:  \boxed{\large{ \sf{a \:  =  \:Math.cbrt(x \: *   \: x + 3 \: * \: y \:  -  \: 2}}} \red \bigstar

\underline{\large{\sf{Additional \: Information:}}}

  • Method is a named block of a códe in a class. It is executed within a defined set of instructions.
  • Methods and variables of math class are defined as static members.
  • Java.lang package contains classes and interfaces which are fundamental to Java programming language.
  • The math class of java.lang package contains generic mathematical functions including some geometric and trigonometric function.

  • Math.ceil returns smallest integer which is greater or equal to the argument.
  • Math.abs returns us the absolute value of a given argument.
  • Math.pow it returns us the value of a first given argument raised to the power of the given second argument.
  • Double datatype is used if a output comes in decimal.
Similar questions