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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!