Starting from:
$16.99

$10.99

Looking out for Number One Solution

Create a program that takes a file of statistics as input, computes how many of the numbers have x as a leading digit for all x 1-9, and then plots a bar graph showing the relative frequency of each of the digits when they lead off a number. The output of your program should look something like this:

File: "sunspot_data.txt" frequency of the lead digit

1: *****************************************************************

2: **********************************************

3: ****************************************

4: ********************************

5: *************************

6: **********************

7: ********************

8: ********************

9: *****************

 

More products