Matlab program that keeps prompting the user for integers until a negative number is entered
Show older comments
then the program should then create two new vectors, odds and evens which contain the odd and even numbers, respectively, entered by the user.
3 Comments
Cedric
on 4 Apr 2013
What have you done so far?
josh
on 4 Apr 2013
Edited: Walter Roberson
on 4 Apr 2013
Walter Roberson
on 4 Apr 2013
How will you test whether an integer is odd or even? Is 0 odd or even?
Have you read MATLAB's documentation about using arrays?
Answers (0)
Categories
Find more on Operators and Elementary Operations 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!