Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Hi :)

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Location
    Serbia
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hi :)

    I am new in java, and I'm doing the exercises. I have a problem with a solution:

    this how should to look my code, but I don't know how to solved

    Pick some positive integer and call it n.
    If n is even, divide it by two.
    If n is odd, multiply it by three and add one.
    Continue this process until n is equal to one.

    I should make Hofstadter...

    I do'n know how to type

    "If n is even, divide it by two.
    If n is odd, multiply it by three and add one."

    thanks in advance...

  2. #2
    Senior Member PhHein's Avatar
    Join Date
    Mar 2013
    Location
    Germany
    Posts
    609
    My Mood
    Sleepy
    Thanks
    10
    Thanked 93 Times in 86 Posts

    Default Re: Hi :)

    Post your best attempt and we'll gladly help. Google modulo, that will get you started.

  3. #3
    Junior Member
    Join Date
    Jul 2013
    Location
    Serbia
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Hi :)

    I found!!!

Tags for this Thread