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 ex
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
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 ex
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 Go ... Save, Compile, Run (ctrl-enter) public int evenNines(int num) {
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!