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: A Number Test. Help On How To Do This?

  1. #1
    Junior Member
    Join Date
    Sep 2017
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default A Number Test. Help On How To Do This?

    I'm very new to coding and haven't done any for over a year now. Hopefully someone can give me an example and lead me to the right direction because right now I'm lost on where to begin on being able to satisfy these conditions:
    User inputs a number and if it satisfy's all 7 conditions it's a 'very odd number'.

    (1) it's an odd number
    (2) it has an odd number of digits
    (3) all of its digits are odd numbers
    (4) the sum of its digits is an odd number
    (5) the product of its digits is an odd number
    (6) all digits comprising the sum of its digits are odd numbers
    (7) all digits comprising the product of its digits are odd numbers

    (I have the strings and ints)

  2. #2
    Member
    Join Date
    Aug 2017
    Location
    Northern Ireland
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: A Number Test. Help On How To Do This?

    It'd be no fun if you were just given the solution now would it? So why don't you start by showing what you've got so far and where you're stuck. That'd make a good start for a discussion.
    Tim Driven Development

  3. #3
    Junior Member
    Join Date
    Sep 2017
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: A Number Test. Help On How To Do This?

    Oh, man! What a mess of a program I've created.

    ggzjaFk.jpg

    A total of 43,289 very odd numbers from 0 - 2,147,483,647. If you'd like, message me and I will send you the class

Similar Threads

  1. Replies: 10
    Last Post: November 8th, 2012, 06:29 AM
  2. Replies: 2
    Last Post: November 7th, 2012, 10:45 PM
  3. Java Dos Logic Test count all non increasing number
    By Jhovarie in forum Object Oriented Programming
    Replies: 3
    Last Post: January 13th, 2011, 03:28 PM
  4. Replies: 4
    Last Post: June 10th, 2009, 01:04 AM