0
2.5kviews
Explain the purpose of following standard library functions

(i) Floor () (ii) ceil () (iii) sqrt ()


Mumbai university > FE > SEM 2 > Structured Programming Approach

Marks: 3M

Year: May 2013

1 Answer
0
140views

I) Floor ():

  • Floor function returns the greatest integer not greater than x.

  • For example if the input is 2.25 then output will be 2.00.

Syntax: double floor (double x);

II) Ceil ():

Ceil function is used to round up a number i.e. it returns the smallest number which is greater than argument passed to it.

Syntax: double ceil (double);

III) Sqrt ():

Sqrt function returns square root of a number.

Syntax: double sqrt (double);

Please log in to add an answer.