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

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

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

Post by answerhappygod »

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 1
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 1 (11.6 KiB) Viewed 42 times
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!
Post Reply