English

Given: double b = Math.ceil(3.4) + Math.pow(2, 3); - Computer Applications

Advertisements
Advertisements

Question

Given: double b = Math.ceil(3.4) + Math.pow(2, 3);

Options

  • 12.0

  • 11.0

  • 11.4

  • 11.5

MCQ

Solution

12.0

Explanation:

Math.ceil() returns the smallest whole number that is bigger than or equal to the argument. Math.pow(a,b) gives the value ab. Therefore, the ultimate value of b will be:

b = Math.ceil(3.4) + Math.pow(2,3);

b = 4.0 + 8.0

b = 12.0

shaalaa.com
  Is there an error in this question or solution?
Chapter 1.07: Mathematical Library Methods - EXERCISES [Page 80]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.07 Mathematical Library Methods
EXERCISES | Q I. 5. | Page 80
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×