Q:

ceil and floor

Ceil (short for ceiling) and floor function are both mathematical 
functions. ... For example, ceil function returns the least value 
of the integer that is greater than or equal to the specified number.
On the other hand, floor function gets the greatest value that is
less than or equal to the specified number.
1
Examples of Floor:
=====================
Input : 2.5
Output : 2

Input : -2.1
Output : -3

Input : 2.9
Output : 2

===============================

Examples of Ceil:
=====================
Input : 2.5
Output : 3

Input : -2.1
Output : -2

Input : 2.9
Output : 3
0

Related

New to Communities?

Join the community