0

Java Output

Hi im A learner wants to learn and take notes on challenge questions can you guys explain to me what happens to this code?need a clearer insight.tnx in advance😀 https://code.sololearn.com/cpVH2nmm98Ob/?ref=app

17th Apr 2018, 10:30 AM
Challenge Quest
Challenge Quest - avatar
2 Answers
+ 2
Math.ceil rounds a float to the nearest highest integer but it returns a double so in this case PI... is rounded to 4.0000000... Then the formatting 2.4f means we should have 4 decimal places so: 4.0000... If I had 2.6f then 6 decimal places and so on...
17th Apr 2018, 10:32 AM
cyk
cyk - avatar
+ 1
Thanks!
17th Apr 2018, 10:35 AM
Challenge Quest
Challenge Quest - avatar