English

What values will be stored in the variables p and q after executing the following code? double a = −99.51, b = −56.25; double p = Math.abs(Math.floor(a)); double q = Math.sqrt(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 a = −99.51, b = −56.25; 
double p = Math.abs(Math.floor(a)); 
double q = Math.sqrt(Math.abs(b)); 
Answer in Brief

Solution

p = 100.0

q = 56.25

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. (d) | Page 79
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×