Advertisements
Advertisements
प्रश्न
Given: double m = Math.max(Math.cei1(14.55),15.5);
What will be the final value stored in the variable m?
विकल्प
15.0
14.0
15.5
14.5
MCQ
उत्तर
15.5
Explanation:
- Math.ceil(14.55): This function returns the smallest integer larger than or equal to the specified number. For 14.55, Math.ceil(14.55) gives 15.0.
- Math.max(15.0, 15.5): This function returns the bigger of two values. Between 15.0 and 15.5, the greater value is 15.5.
- So the final amount saved in the variable m is 15.5.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?