"Frequency of occurrence of a digit"
Your solution will be scored against some number of hidden test cases. A sample is provided below.
Find the frequency of occurrence of a given digit in all whole numbers between 0 and a given positive integer(both inclusive).
Let's say that the number to count (we'll call it K) is 2.
So, between 0 and 35, the K (in this case 2) appears 14times:
2, 12, 20, 21, 22 (twice), 23, 24, 25, 26, 27, 28, 29 32 = 14times
Input consists of 2 lines.
First line contains the number (K) which the program needs to count.
Second line contains the number N, which is the maximum number in the range to check for occurrences of K (for example, between 0 and N).
All number are positive whole numbers. There are no decimals or fractions.
Print the number of K's appearing between 0 and N (both inclusive).
Print O if not found.
Code evaluation based on output, please do NOT output anything else.
Sample Input :
Sample Output: 14
43 freelancers are bidding on average $37 for this job
HI..i am proficient in core Java OO programming with data structures, algorithms, AI programming and can help you write console as well as GUI desktop applications.
Hi, I would like to write the respective Java program for you. You can relly on me. I am an experienced developer and mathematician. Looking forward to hear from you. Best regards, Oleg
Hi there, I checked your requirements and guarantee you it's gonna be done within the next few hours. Let's contact via chat so that I can start work immediately. Wish you the best.