# Trouble understanding what this is asking.

• October 29th, 2013, 02:37 PM
daniel95
Trouble understanding what this is asking.
I'm having trouble understanding exactly what I'm supposed to do with this problem, if anyone could try to explain it that would be very appreciated. Thanks.

Problem:
Write a program that accepts a user determined amount of numbers and calculates the product of the odd numbers entered, and also tells what the lowest odd number entered was.
• October 29th, 2013, 03:17 PM
Norm
Re: Trouble understanding what this is asking.
The user tells you how many numbers he will enter: say 3
and then enters that number of numbers: 4 5 6
• October 29th, 2013, 03:39 PM
daniel95
Re: Trouble understanding what this is asking.
So since it says to calculate the product of the odd numbers entered, in your example would it just be 5?
• October 29th, 2013, 03:54 PM
Norm
Re: Trouble understanding what this is asking.
5 is the only odd number entered. What are the program's requirements for when there is less than 2 odd numbers?
• October 29th, 2013, 04:25 PM
daniel95
Re: Trouble understanding what this is asking.
It doesn't say anything about that so I'd assume it would just be the number itself.
• October 29th, 2013, 04:31 PM
Norm
Re: Trouble understanding what this is asking.
Do you understand it now?
• October 29th, 2013, 04:58 PM
daniel95
Re: Trouble understanding what this is asking.
Yes and thank you for that, the only thing I'm having trouble with now is how to accept a user determined amount of numbers. I know how to accept a defined amount of numbers but not an amount that can change.
• October 29th, 2013, 05:19 PM
Norm
Re: Trouble understanding what this is asking.
Read the number into a variable and use the contents of that variable to control the logic.