Computer Science, asked by wwwmrigapabarman, 8 months ago

what will be the output value : if a = 220.13 and b = 230.73, c = 64.34 System.out.println( Math.max(Math.floor(a),Math.ceil(b))); System.out.println(Math.cbrt(math.round(c))); ​

Answers

Answered by Anonymous
1

Answer:

I don't know the answer

Answered by Haidy47
1

Answer:

System.out.println(Math.max(Math.floor(a), Math.ceil(b))); will give 231

System.out.println(Math.cbrt(math.round(c))); will give 4

Explanation:

Details about the Java Functions used in this program:

Math.max(); - It gives the greater value out of the given two int values.

example: Math.max(124,215); It will give 215

Math.floor(); - It truncates the decimal value.

example: Math.floor(2.9); It will give just 2

Math.ceil(); - It gives an upward rounded number.

example: Math.ceil(2.1); It will give 3

Math.cbrt(); It gives cube root of a number

example: Math.cbrt(125); It will give 5

Math.round(); It rounds upward if the value after the decimal is greater than or equal to 5 and rounds downward if the value after decimal is smaller than 5.

example:

Math.round(7.2); It will give 7

Math.round(7.5); It will give 8

Math.round(7.7); It will give 8

Similar questions