C++ Math floor()Last Updated : 17 Mar 2025 It rounds the value to the nearest integer which is not greater than the given value. For example: SyntaxSuppose a number is 'x'. Syntax would be : Parameterx : It is the value that rounds to the nearest integer. Return valueIt returns the value that round to the nearest integer not greater than x. Example 1Let's see a simple example by considering a positive value. Output: Initial value of x is : 7.8 Now, the value of x is :7 Example 2Let's see a simple example by considering a negative value. Output: Initial value of x is : -10.2 Now, the value of x is :-11 Next TopicC++ Math Functions |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India