0
Explain this question please
print Math::PI.ceil +1 print Math::PI.floor -3 #answer is 50
3 odpowiedzi
+ 5
Math::PI is approximately 3.14
.ceil round it to the nearest superior integer (here 4)
4 + 1 = 5
.floor round it to the nearest inferior integer (here 3)
3 - 3 = 0
print do not put a 'end of line' so the result is 50
+ 2
you are welcomed :)
+ 1
Thanks. I didn’t knew what the ceil and floor methods do. Thanks for explaining it to me