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

# Thread: A Number Test. Help On How To Do This?

1. ## 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. ## 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.

3. ## 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