- I think
ceil()
function should have given2.000000
instead of1.000000
when I write :
int main() {
printf( "%f", ceil(5/3) );
return 0;
}
and floor()
function gives 1.000000
as expected. I don't understand why ceil is giving 1.000000
.
- The snippet below prints 0 and I don't know why :
int main() {
printf("%d", ceil(5.0/3));
return 0;
}