beyondgrader.com Logo
DemoBrowseAboutTeamLogin

Odd Digits

[email protected] // 1.0

Assume an int variable called number has been declared for you. Print how many of number's digits are odd (when written in base 10 as usual). For example, if the number is 32, you would print 1 because only one digit (the 3) is odd. Note that the number may be negative.