Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: PLEASE HELP ME!

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default PLEASE HELP ME!

    Hello so this is my first time here.
    I just wanna need some help because i'm still a newbie in programming.
    well, so this is my problem..

    how to compute the ceiling and floor of 5.4 in java WITHOUT USING MATH CLASS (math.ceil or math.floor)

    --- Update ---

    Sorry if I posted it in a wrong section ;(

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: PLEASE HELP ME!

    What have you done so far to solve your problem?
    Can you describe what the ceiling and floor values are for 5.4?
    The description should help you work out the logic for computing the values.
    Given 5.4 what is the ceiling and how do you get it?
    Given 5.4 what is the floor and how do you get it?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy Re: PLEASE HELP ME!

    Quote Originally Posted by Norm View Post
    What have you done so far to solve your problem?
    Can you describe what the ceiling and floor values are for 5.4?
    The description should help you work out the logic for computing the values.
    Given 5.4 what is the ceiling and how do you get it?
    Given 5.4 what is the floor and how do you get it?
    Honestly I don't know what to do first, what I know to get the ceiling of 5.7 is using a math class(math.ceil)
    I wanna know now is how to get it without using math classes. I'm going crazy now. Please help me.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: PLEASE HELP ME!

    I don't know what to do first
    You missed answering my questions in post#2. Can you look at that post and answer those questions? Those questions are not how to write code questions. They are asking for some words and math expressions showing how to compute the values.

    Otherwise if you don't know what a ceiling or a floor is, you need to do some research to find out what those two terms mean before you can think about designing and writing a program to compute their values given a number.
    If you don't understand my answer, don't ignore it, ask a question.

  5. The Following User Says Thank You to Norm For This Useful Post:

    panzel (December 28th, 2012)