Quote:
Originally Posted by AbhishekApple
int tot = ceil(1/5); not working
o/p: 0
instead if i directly provide
int tot =ceil(0.6); working
o/p: 1
am using objective c in iphone
|
The expression "1/5" is an integer expression that produces 0 at the result. ceil(0) is 0. What does ceil(1.0f/5.0f) produce?