ICSE Class 10 Computer Applications
Question 6 of 30
Solved 2025 Specimen Paper ICSE Class 10 Computer Applications — Question 6
Back to all questions4.0
Reason — Let's evaluate the expression step by step:
System.out.println(Math.ceil(6.4) + Math.floor(-1 - 2));Step 1: Evaluate Math.ceil(6.4)
- The
ceilmethod rounds a number up to the nearest integer. Math.ceil(6.4)→7.0(asceilreturns adouble).
Step 2: Evaluate -1 - 2
-1 - 2 = -3
Step 3: Evaluate Math.floor(-3)
Math.floor(-3): Thefloormethod rounds a number down to the nearest integer.Math.floor(-3)→-3.0(asflooralso returns adouble).
Step 4: Add the Results
Math.ceil(6.4)+Math.floor(-3)→7.0 + (-3.0)- Result =
4.0