Computer Science, asked by iamjanhavi06, 5 months ago

3.2
II. Predict the output: HW
1. System.out.println(Math.sqrt(10.24));
* 2. System.out.println(Math.rint(-99.4));
3. System.out.println(Math.cbrt(42.875));
:
-25.5
4. System.out.println(Math.min(-25.5, -12.5));
5. System.out.println(Math.ceil(-0.95));
6. System.out.println(Math.round(-18.51));
19.0
- 77.66
7. System.out.println(Math.max(-77.66, -87.45)); :
8. System.out.println(Math.floor(-0.88));
x 9. System.out.println(Math.rint(98.5));
10. System.out.println(Math.ceil(65.5));
To.o
TTT​

Answers

Answered by Anonymous
1

Answer:

  • If you want to roundoff any no. Upto two decimal places, see the next no. ( i.e 3rd digit after decimal ) If that digit will be more than 5 the no. which is before it will be added by 1 . Here the no. is 15.78947368 Round off this no. upto two decimal places will be 15.79 ans. Hope this will help you!! Thankyou
Similar questions