Computer Science, asked by snighdashreya42, 2 months ago

write the equivalent java expression of the following​

Attachments:

Answers

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

( i ) |a⁵ - b|

  • Here we would be using abs method because the absolute value of argument that is a⁵ and √b is bring returned.
  • pow method is also will be used because first argument that is a is raised to the power of second argument that is 5.
  • We would also be using sqrt method because square root of an argument that is b is being returned.

Syntax:-

  • math.abs
  • math.sqrt
  • math.pow

Answer formed:-

  • Math.abs ( Math.pow (a,2) - Math.sqrt (b) )

( i i ) ax + b / cx + d

  • Here no method would be used. We would simply multiply the variables and form the expression

Answer formed:-

  • a * x + b / c * x + d

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.cbrt returns cube root of a double value.
  • 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.max method gives us the largest of two given arguments
  • Math.min method gives us the smallest of two given arguments

More similar questions :

https://brainly.in/question/20782361

https://brainly.in/question/20735428

https://brainly.in/question/35751426

https://brainly.in/question/24154252

https://brainly.in/question/20191304

Similar questions