Output of Math.round(14.7)+Math.floor(7.9)
Answers
Answered by
27
22 is the right answer
Hope it helps
Answered by
1
Question :
What will be the output of Math.round(14.7)+Math.floor(7.9)
Answer :
OUTPUT
22
- The function Math.round() returns the nearest integer value.
- Hence, 14.7 is rounded up to 15.
- The function Math.floor() returns the double value rounded downwards.
- Hence, 7.9 is rounded down to 7.
- Math.round(14.7)+Math.floor(7.9) returns the value as 15 + 7 which is equal to 22.
- Hence the output of the given operation will be 22.
- The operation Math.round(14.7)+Math.floor(7.9) will return 22 as output.
#SPJ3
Similar questions
English,
5 months ago
Hindi,
5 months ago
English,
11 months ago
Math,
11 months ago
Social Sciences,
1 year ago