ceil abs – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  

Login
[lwa]



Exam Questions-ICSE2016-03B #JAVA#4237    siteicon   siteicon  

Problem Statement - ceil abs

Give the output of the following Math functions:
(i) Math.ceil(4.2)
(ii) Math.abs(-4)

Solution

TC++ #4237

(i) Math.ceil(4.2)

5.0 (As nearest highest whole number double value near 4.2 would be 5.0)

(ii) Math.abs(-4)

4 (By removing sign only 4 would be left. abs will return integer value only)


Share

sunmitra| Created: 31-Mar-2018 | Updated: 16-Apr-2019|ICSE2016









Back