*
The moose likes Beginning Java and the fly likes double value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "double value" Watch "double value" New topic
Author

double value

fabio chumpitaz
Greenhorn

Joined: Oct 30, 2002
Posts: 4
find the ceiling of a double value and write a method to find its floor.
the ceiling of a number d is the smallest integer greater of equal d.
the floor of a number d is the largets integer less than or equal to d.
example...ceiling 5.4 is 6
floor 5.4 is 5
would someone help wiht this?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

This is the same reply as your other requests.
Sorry, we don't do homework.
We would be happy to help with specific requests if you have any.
Dave
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
There are methods in the Math class for this.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
fabio,
Welcome to JavaRanch!
How have you thought to perhaps begin to solve this problem?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
Consider Paul's rocket mass heater.
 
subject: double value
 
Similar Threads
Math.floor( )
Round for negative nr
Confusion Math.random()
sun sample mock q
output needs to be explained