0
7.0kviews
Explain the following functions: floor(), ceil(), trunc(), sqrt()

Mumbai University> FE > Sem 2> STRUCTURED PROGRAMMING APPROACH

Marks: 4 M

Year: Dec 2016

1 Answer
1
646views

floor()

Returns the largest integer value less than or equal to of given value.

Example:

floor(1.6) returns 1

floor(3.1) returns 3

floor(5.0) returns 5

floor(-1.6) returns -2

ceil()

Returns the smallest integer value greater than or equal to given value.

Example:

ceil(1.6) returns 2

ceil(5.0) returns 5

ceil(3.1) returns 4 …

Create a free account to keep reading this post.

and 2 others joined a min ago.

Please log in to add an answer.