Results 1 to 3 of 3
  1. #1
    Renxx is offline Member
    Join Date
    Oct 2011
    Posts
    16
    Rep Power
    0

    Default converting a given positive integer m to a positional number system in base n

    Java Code:
    Write a Java method to convert a given positive integer m to a positional number system in base n (n is in between 2 and 36). The result is a string consisting of digits and lowercase latin letters if needed.
    public static String toSysString (int m, int n)
    Example: toSysString (14, 4) == "32"
    I have hard to understand what i have to do in this excerises, could some make it more clear.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,771
    Blog Entries
    7
    Rep Power
    21

    Default Re: converting a given positive integer m to a positional number system in base n

    Read the API documentation for the Integer class; there's a method in there that can do the job.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    mamoonrizwan is offline Member
    Join Date
    Apr 2011
    Posts
    19
    Rep Power
    0

    Default Re: converting a given positive integer m to a positional number system in base n

    you havent specified the range of n . could u make it clear
    Last edited by mamoonrizwan; 11-27-2011 at 06:20 PM.

Similar Threads

  1. Replies: 1
    Last Post: 10-28-2011, 09:18 AM
  2. Converting a 2's complement to the proper integer
    By Chuklol in forum New To Java
    Replies: 1
    Last Post: 10-10-2011, 06:47 AM
  3. Testing whether a random number is positive
    By mamoonrizwan in forum New To Java
    Replies: 3
    Last Post: 05-07-2011, 09:58 AM
  4. Converting an integer into a BigInteger
    By mzjazzygirl in forum New To Java
    Replies: 27
    Last Post: 09-23-2010, 07:37 PM
  5. Help with syntax to reverse a positive integer
    By sonny in forum New To Java
    Replies: 14
    Last Post: 02-27-2010, 07:19 AM

Posting Permissions

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