Solved

# value

Posted on 2005-04-19
226 Views
what is value for floor(4.9999)+ cel(2.0)
0
Question by:cuong5985

LVL 30

Expert Comment

Hi cuong5985,

Without know what is a floor, and waht is a cel, that question is difficult to answer.

David Maisonave :-)
Cheers!
0

Author Comment

i mean floor(4.9999) + ceil(2.0) i dont know what floor mean, but ceil is round up
0

LVL 30

Expert Comment

>> mean floor(4.9999) + ceil(2.0) i dont know what floor mean, but ceil is round up

Since floor is not part of the C++ standard, we can not answer your question without seeing the implementation.
Post the code.
0

LVL 16

Accepted Solution

floor rounds down so floor(4.9999) = 4
ceil rounds up so ceil(2.0) = 2

I will leave it up to you to calculate 4 + 2 ;)

Paul
0

## Featured Post

### Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.