Results 1 to 3 of 3
  1. #1
    jpjava is offline Member
    Join Date
    Jul 2013
    Posts
    2
    Rep Power
    0

    Default Display both the original integer and the binary output

    I'm a beginner in java and I need help with this.

    - Prompt the user for a positive integer less than 100.
    - Convert the integer into its binary representation, you MUST hard code the solution with your own algorithm with loop NOT using the java buit-in method such as: Integer.toBinaryString(int ).
    - Display both the original integer and the binary output.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: Display both the original integer and the binary output

    I've given you this link before, but you probably never bothered to return to that thread so here it is again: How to ask questions the smart way

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Huskies's Avatar
    Huskies is offline Member
    Join Date
    Jul 2011
    Posts
    47
    Rep Power
    0

    Default Re: Display both the original integer and the binary output

    First I would suggest working through this on paper or something similar. Think about the steps you would take to convert any given integer to its binary representation. Once you see the steps you would use by hand, then it will be a lot easier to convert it to java code. If you get stuck on actual java code, then come back and we can help you with that

Similar Threads

  1. Replies: 1
    Last Post: 11-01-2011, 05:35 PM
  2. convert integer to binary
    By leepikamukharji in forum New To Java
    Replies: 2
    Last Post: 04-30-2011, 04:19 AM
  3. How to Print every tenth integer in my output
    By jim01 in forum New To Java
    Replies: 13
    Last Post: 04-16-2011, 03:00 AM
  4. Replies: 12
    Last Post: 10-31-2010, 06:14 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
  •