Results 1 to 6 of 6
  1. #1
    maran.ramar is offline Member
    Join Date
    Nov 2010
    Posts
    1
    Rep Power
    0

    Thumbs up Need Lowest and Highest decimal point for 0.73 and 0.76

    Hi Guys, Thanks in advance.

    Am facing a problem to find the lowest and highest decimal point for 0.73 and 0.76 in Java.

    Sample:

    0.73 - Highest value as 0.7348 and Lowest value as 0.7249

    0.76 - Highest value as 0.7648 and Lowest value as 0.7549

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Perhaps it's me, but I have no idea on earth what you're trying to do. Perhaps you could clarify it more, and most especially, show us what you've done so far code-wise.

    Luck!

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    I wonder how you define that lowest and highest value respect to another number. What's the logic behind that. I've never heard about such a definition.

    Believe it, without having a proper understanding the concept you cannot put it into a code.

  4. #4
    berkeleybross's Avatar
    berkeleybross is offline Senior Member
    Join Date
    Feb 2010
    Location
    England
    Posts
    187
    Rep Power
    5

    Default

    Isnt it quite simple?
    Treat the number as a string and append "48".
    Lower the last digit by one and append "49"

    Or am i missing something?

    Also, wouldnt the lowest value be "50" and the highest "49" - assuming rounding up to nearest nth d.p.

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by berkeleybross View Post
    Isnt it quite simple?
    Treat the number as a string and append "48".
    Lower the last digit by one and append "49"
    It's simple. But what you've tried so far is the most important things. Show us it over here, so all of us (including you) can improve it.

Similar Threads

  1. cant get highest and lowest to display
    By tracey in forum New To Java
    Replies: 2
    Last Post: 05-16-2010, 09:48 AM
  2. QuickSort highest lowest Situation
    By Tenn in forum New To Java
    Replies: 17
    Last Post: 05-06-2009, 05:37 AM
  3. Replies: 4
    Last Post: 01-16-2009, 07:17 PM
  4. Replies: 21
    Last Post: 11-05-2008, 03:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •