State the value and datatype of the answer for the following:
a. Math.abs(-5)-Math.abs(-7)
b. Math.max(1.5e-2,0.095)
c. Math.round(1.49+1)
d. Math.round(1.49)+1
e. Math.floor(5.6)
f. Math.ceil(4.1)
g. Math.min(3.4,1)
please answer all the questions
Answers
Answered by
10
Answers:
a.
b.
c.
d.
e.
f.
g.
Explanation:
a. Math.abs(-5)-Math.abs(-7)
- abs returns the absolute value of the given number or argument.
- The data type can be int, float, long, double.
- The value of Math.abs(-5) is 5.
- The value of Math.abs(-7) is 7.
- So, the value of Math.abs(-5)-Math.abs(-7) .
b. Math.max(e-2,)
- max returns the largest numbers of the two arguments .
- The data type can be int, float, long, double.
- The largest of e-2 and is
- So, the value of Math.max(e-2,) is .
c. Math.round(+1)
- round returns the nearby int or long (as per the argument).
- Basically, it it used to round off the number.
- The datatype can be double or float.
- .
- The nearby value to is 2.
- So, the value of Math.round(+1) is 2.
d. Math.round()+1
- round returns the nearby int or long (as per the argument).
- Basically, it it used to round off the number.
- The datatype can be double or float.
- The nearby value to is 1.
- So, the value of Math.round() is 1.
- Now, Math.round()+1 .
e. Math.floor()
- floor returns the largest integer which is less than or equal to the given argument.
- The datatype can be double.
- So, the value of Math.floor() is .
f. Math.ceil()
- ceil returns the smallest integer which is greater than or equal to the given argument.
- The datatype can be double.
- So, the value of Math.ceil() is .
g. Math.min(,1)
- min returns the smallest numbers of the two given arguments.
- The datatype can be int, float, long, double.
- So, the value of Math.min(,1) is 1.
Answered by
3
Answer:
nakku setha payale loosu
Similar questions