+ 1
Math ceil
Why Math.ceil(3/2) gives 1 and not 2?
1 Answer
+ 5
3/2 results 1 so ceil(1) is 1. (int/int=int)
If you trying to get 1.5 as result then use a double type data like
Math.ceil(3.0/2) ; give 2, because 3.0/2 = 1.5
Hot today
Python — File Handling
2 Votes
Help me
0 Votes
What’s wrong?
2 Votes
Question is write a c program to print prime numbers up to n and print the largest number in array.
1 Votes
Achievements on Sololearn
1 Votes
How to draw in the console?
0 Votes