for loops and odd numbers
Show older comments
I am trying to write a script that will find the product of all odd numbers that count up to a user input value. How can I write the code to identify the odd digits? If the user entered 8 I need to be able to single out the values of 1 3 5 7 to the multiply together.
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!