Computer Science, asked by meghashah2014, 1 month ago

Give the output of the following Math Functions: When double a = -7.35, double b = 16.84, double c = -56.25
i) double x = Math.abs(Math.ceil(a));
ii) double y = Math.rint(Math.max(a,b));
iii) double z = Math.sqrt(Math.abs(b));​

Answers

Answered by adityaray38970
0

Answer:

double x = 2.9, y = 2.5;

System.out.println(Math.min(Math.floor(x), y));

System.out.println(Math.max(Math.ceil(x), y));

ANSWER

2.0

3.0

WORKING

Math.floor(2.9) gives 2.0. Math.min(2.0, 2.5) gives 2.0.

Math.ceil(2.9) gives 3.0. Math.max(3.0, 2.5) gives 3.0.

Similar questions