Computer Science, asked by madhuritoppo796, 1 month ago

System.out.println(Math.sqrt(5+Math.min(59,84)); the output is?​

Answers

Answered by anindyaadhikari13
3

\texttt{\textsf{\large{\underline{Answer}:}}}

  • The output of the given co‎‎de is 8.0

\texttt{\textsf{\large{\underline{Solution}:}}}

Given expression,

> Math.sqrt(5 + Math.min(59, 84))

= Math.sqrt(5 + 59) [Math.min() returns the minimum value among two numbers]

= Math.sqrt(64)

As Math.sqrt() returns the square root of a number, we get,

= 8.0

The value is now displayed on the screen.

Resultant Data Type: Double.

\texttt{\textsf{\large{\underline{Know More}:}}}

Some important math functions:

  1. Math.min(): Returns minimum value among two numbers.
  2. Math.max(): Returns the maximum among two numbers.
  3. Math.pow(): Returns a number raised to the power another number.
  4. Math.sqrt(): Returns square root of a positive number.
  5. Math.cbrt(): Returns cube root of any number.
  6. Math.log(): Returns natural logarithmic value of a positive number.
Answered by Anonymous
1

Answer:

\sf\fbox\red{Answer:-}

The answer will be 8.0

Similar questions