Levels Tought:
University
Teaching Since: | Apr 2017 |
Last Sign in: | 345 Weeks Ago, 3 Days Ago |
Questions Answered: | 9562 |
Tutorials Posted: | 9559 |
bachelor in business administration
Polytechnic State University Sanluis
Jan-2006 - Nov-2010
CPA
Polytechnic State University
Jan-2012 - Nov-2016
Professor
Harvard Square Academy (HS2)
Mar-2012 - Present
Write a recursive method called evenDigits that accepts an integer parameter and that returns the integer formed by removing the odd digits from it.
For example, evenDigits(8342116) returns 8426 and evenDigits (-34512) returns -42.
If the number is 0 or has no even digits, such as 35159 or 7, return 0.
Leading zeros in the result should be ignored.
Â
-----------