Results 1 to 3 of 3
  1. #1
    kraigballa is offline Senior Member
    Join Date
    Oct 2011
    Posts
    115
    Rep Power
    0

    Default Recursion question?

    I'm really not even sure what this question is asking. This is on a practice test for my exam on Recursion. Any help would be great....direction to take, etc

    Write a recursive method
    public String changeBase( int number, int base)
    to change a base 10 number to another base between 2 and 9, returning the result as a string
    of digits. If number is 0, return an empty string. Otherwise, append number modulo base onto
    the result of a recursive call to changeBase of number divided by base and the new base. For
    example, to convert 20 to base 8, calling changeBase( 20, 8) causes (20 % 8) to be appended
    onto changeBase( 2, 8).

    Thank you for your time!!

  2. #2
    kraigballa is offline Senior Member
    Join Date
    Oct 2011
    Posts
    115
    Rep Power
    0

    Default Re: Recursion question?

    Nevermind
    Last edited by kraigballa; 03-20-2012 at 06:11 AM.

  3. #3
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default Re: Recursion question?

    Nice homework dump. What is your question?

Similar Threads

  1. recursion help
    By Yakg in forum New To Java
    Replies: 6
    Last Post: 02-18-2011, 02:10 PM
  2. Again recursion question
    By luke in forum New To Java
    Replies: 5
    Last Post: 10-05-2010, 01:02 AM
  3. Recursion question
    By luke in forum New To Java
    Replies: 12
    Last Post: 10-04-2010, 11:04 PM
  4. Touch recursion question
    By myst in forum New To Java
    Replies: 18
    Last Post: 06-08-2010, 07:48 PM
  5. recursion and tail-recursion differences
    By OptimusPrime in forum New To Java
    Replies: 2
    Last Post: 12-28-2009, 07:26 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
  •