C++ Math floor()
It rounds the value to the nearest integer which is not greater than the given value.
Suppose a number is 'x'. Syntax would be :
x : It is the value that rounds to the nearest integer.
It returns the value that round to the nearest integer not greater than x.
Let's see a simple example by considering a positive value.
Initial value of x is : 7.8 Now, the value of x is :7
Let's see a simple example by considering a negative value.
Initial value of x is : -10.2 Now, the value of x is :-11