## Floor Function >> Round Down Value >> Math.h >> Header File in C

Floor Function :

1. Floor() is also Called as “Round Down”
2. floorl Function Evaluates “floorl finds the largest (long double) integer not Greater than x.”
3. Returns the largest integral value that is not greater than x.
4. Suppose num = 12.1 then Floor(num) Returns 12

Syntax :

```double floor (double x);float floor (float x);long double floor (long double x);
Live Example :
/* floor example */#include<stdio.h>#include<math.h>int main (){  printf ("floor of  4.5 is %fn", floor(4.5));  printf ("floor of  6.1 is %fn", floor(6.1));  printf ("floor of -2.3 is %fn", floor(-2.3));  printf ("floor of -3.8 is %fn", floor(-3.8));  return 0;}
Output :
floor of  4.5 is 4floor of  6.1 is 6floor of -2.3 is -3floor of -3.8 is -4
Negative Parameter ???  As Move Towards Positive Direction , we can conclude that –

5 > 4 > 3 > 2 > 1

So floor(3.2) Returns ==> 3
As Move Towards Negative Direction , we can conclude that –

-1 > -2 > -3 > -4 > -5

So floor(-3.2) Returns ==> -4

var disqus_config = function () {
this.page.url = PAGE_URL;  // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://programmingtutorials.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
})();

Previous Page

Next Page