Question: Please solve this by using JAVA Show me the OUTPUT Thanks in advance ! a/Local/Packages/Microsoft.MicrosoftEdge_8wekyb3d8bbwe/TempState/Downloads 1.1 Count Digits We'll start out with something we've done
a/Local/Packages/Microsoft.MicrosoftEdge_8wekyb3d8bbwe/TempState/Downloads 1.1 Count Digits We'll start out with something we've done in class before. Write a function countDigits which takes in an int num, which will return the number of digits in num. For example countDigits should evaluate to: numbers 0-9, 1 for . 2 for numbers 10-99, 3 for numbers 100-999, etc Remember, use repeated division by 10 to calculate the number of digits in num. (There's also a tricky solution using logarithms that avoids the repeated division!)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
