Question: A program with a method called allDigitsOdd that returns whether any digit of a positive integer is odd. Return true if the number consists entirely
A program with a method called allDigitsOdd that returns whether any digit of a positive integer is
odd. Return true if the number consists entirely of odd digits (1,3,5,7,9) and false if any of its digits are
even (2,4,6,8,0). For example, the call allDigitsOdd(1357) return true but allDigitsOdd(9134) should return
false.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
