Give the output of the following program segment:
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):
Answers
Answered by
78
Give the output of the following program segment:
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):
Using ; Mathematical Library Methods
The following double x=2.9,y=2.5;
It has the range of low to high near integer .
2.0 - 2.1- 2.2-2.3-2.4-2.5-2.6-2.7-2.8-2.9-3.0
Range upto 2.0 to 3.0
OUTPUT :-
- 2.0
- 3.0
_______________________________________
Anonymous:
Superb! :claps:
Answered by
3
Using ; Mathematical Library Methods
The following double x=2.9,y=2.5;
It has the range of low to high near integer
2.0 - 2.1- 2.2-2.3-2.4-2.5-2.6-2.7-2.8-2.9-3.0
Range upto 2.0 to 3.0
OUTPUT :-
2.0
3.0
HOPE IT HELPS U
PLEASE MARK ME AS BRAINLIST
Similar questions