Google
 
Webcprogramming.com




An Affiliate of AIHorizon




floor()

Prototype: double floor(double Value);
Header File: cmath
Explanation: Returns the largest interger value smaller than or equal to Value. (Rounds down)




Example:
//Example will output 5.9 rounded down
#include <cmath>
#include <iostream>

using namespace std;

int main()
{
  cout<<"5.9 rounded down: "<<floor(5.9);
}
Other Functions


-----
Interested in advertising with us?
Please read our privacy policy.
Copyright © 1997-2005 Cprogramming.com. All rights reserved.
Designs