C Reference function floor()

Usage of floor():

double floor(double x);

Parameters:

There is no range limit on the argument.

Return value:

There is no range limit on the return value.

Source code example of floor():


	#include<stdio.h>
	#include<math.h>

	main()
	{
		printf ("Floor of 3.4 is %.1lf\n", floor(3.4));
		return 0;
	}

Output of the floor example program above:


	Floor of 3.4 is 3.0

This entry was posted in C Reference math.h Functions. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed. Tweet This! Tweet This! or use to share this post with others.

There is currently one response to “C Reference function floor()”

Why not let us know what you think by adding your own comment!

  1. sandeep kosta on July 16th, 2012:

    i owe u