English

What values will be stored in the variables p and q after executing the following code? double b = −15.6; double p = Math.rint(Math.abs(b)); - Computer Applications

Advertisements
Advertisements

Question

What values will be stored in the variables p and q after executing the following code?

double b = −15.6; 
double p = Math.rint(Math.abs(b)); 
One Line Answer

Solution

p = 16.0

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

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.07 Mathematical Library Methods
Review Insight | Q 1. (b) | Page 79
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×