code in java We need to determine how many 9s are in a number. We only want to count a 9 if it is an even digit in the n

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

code in java We need to determine how many 9s are in a number. We only want to count a 9 if it is an even digit in the n

Post by answerhappygod »

code in java
We need to determine how many 9s are in a number. We only want
to count a 9 if it is an even digit in the number, for example, in
1234 2 and 4 would be even digits. Please write a method that will
determine the number of 9s.
evenNines(999) → 1
evenNines(9) → 0
evenNines(992339939) → 2
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply