Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25
  1. #21
    angryboy's Avatar
    angryboy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    742
    Rep Power
    6

    Default

    OR how about if a thread is unsolved after a certain amount of time/days, then we are free to post solutions.
    Last edited by angryboy; 01-18-2009 at 04:24 AM. Reason: sp err
    USE CODE TAGS--> [CODE]...[/CODE]
    Get NotePad++ (free)

  2. #22
    Join Date
    Jan 2009
    Posts
    90
    Rep Power
    0

    Default

    I got the answer!

    similar to what MC posted

    keep using %10

    the remainder will give you each one of the digit the user inputed.
    so i dont need to use Strings after all .
    and THANKS ALOT GUYS FOR ALL OF YOUR HELP!

  3. #23
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default Great responses...

    Gang... thanks for the mature and appropiate responses. That's what makes this forum great... everybody helping and learning at the same time.
    MC... you have a great idea. I'll start a thread with something... maybe Fubarable can also pitch in also.
    AB: Yes .. I think that would be ok to post your solution after that thread is old. The best solution here is that the OP post his/her solution and then you can post your solution, indicating the differences/improvements.

    Thanks,
    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  4. #24
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default Please post your solution...

    PureAwesomeness: please post your solution. It will be interesting to see how you solved your problem. At the same time, other people can see it and learn and also will be able to comment on how to improve your code. This way, you also will learn.

    Luck,
    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  5. #25
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    user put in something like 123456
    you need to get
    a[1]=1
    a[n]=2...6

    it is easy :) Just use something like
    for(int i=0; i<word.length(); i++){
    char letter=word.charAt(i);
    System.out.println("number "+i+" = "+letter);
    }
    modify a little and try it.

Page 2 of 2 FirstFirst 12

Posting Permissions

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