English

What values will be stored in the variables p and q after executing the following code? double x = 5.9, y = 6.5; double p = (Math.rnin(Math.floor(x), y)); double q = (Math.max(Math.ceil(x), y)); - Computer Applications

Advertisements
Advertisements

Question

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

double x = 5.9, y = 6.5; 
double p = (Math.min(Math.floor(x), y)); 
double q = (Math.max(Math.ceil(x), y)); 
Answer in Brief

Solution

p = 5.0

q = 6.5

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

Englishहिंदीमराठी


      Forgot password?
Use app×