- #1
momentum
- 111
- 0
Its diifcult to express my question...so, i am posting this
ceil(4.5) =?
ceil(4.1)=?
ceil(4.6)=?
ceil(4.5) =?
ceil(4.1)=?
ceil(4.6)=?
Nope, read the defintion given above, then try again.momentum said:ceil(4.5)=4 // is it ok ?
ceil(4.1)=4 //is it ok ?
ceil(4.6)=5 //is it ok ?
Ceil is a mathematical function that rounds a given decimal number up to the nearest integer.
Ceil rounds up to the nearest integer, while floor rounds down to the nearest integer.
The syntax for using ceil varies slightly between programming languages, but typically it is written as "ceil(x)" where x is the number to be rounded up.
Ceil is commonly used when the result of a calculation needs to be a whole number, such as when dealing with currency or counting items.
Yes, ceil can be used on negative numbers. It will round the number up to the nearest integer, which may be a positive or negative number depending on the original input.