my dog learned polymorphism
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

double value

fabio chumpitaz

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

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.
Marilyn de Queiroz

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

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

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

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: double value
It's not a secret anymore!