# Write a program that finds the distribution of leading digits in a set of positive integers

Hi so in my class I have to create a program that outputs this:

Let us count those leading digits...

input file name? 4BenfordLinear.txt

Digit Count Percent

1 5 11.11

2 5 11.11

3 5 11.11

4 5 11.11

5 5 11.11

6 5 11.11

7 5 11.11

8 5 11.11

9 5 11.11

Total 45 100.00

Essentially, the user inputs a textfile and the program is supposed to count the number of leading digits it has. I have no idea how to do this please help....

By: StackOverFlow - Wednesday, 7 November

# Related Posts

- Older News
- Can't figure out why simple method is infinitely looping in Java StackOverFlow (2 days ago) - It's just a simple little method that gets user input to convert an integer from decimal to binary. It uses do-while loops to restart and verify valid input. When it...
- Removes the last two digits of a positive integer base 10 number that is greater than 99 in java StackOverFlow (2 days ago) - My homework question is :Removes the last two digits of a positive integer base 10 number that is greater than 99* @param n* a positive integer number greater than 99*...
- Print factors from 1 t0 100 in java and display their factors in terms of literals but not in terms of numbers StackOverFlow (3 days ago) - The program should be a short piece of code that prints all of the positive integers from 1 to 100 as described more fullybelow. The program may contain multiple methods,...