### How to wtite this method? [closed]

Write a method called isValidCode() that takes an integer number and returns 1 if the number represents valid code and 0 otherwise. Valid code is determined according to the following rules: The number length is at least 3 digits and at most 5 digits. The sum of the digits must be odd number.

Details