Question: I need the following in C programming: Prime Digits All the digits to massive Mersenne primes are contained in text files. Your job is to

I need the following in C programming:

Prime Digits

All the digits to massive Mersenne primes are contained in text files. Your job is to write a program that takes one of these text files as a command line argument and displays how many times each digit appears in the prime number as well as the total number of digits. ZIP files containing such text files can be found at: http://www.mersenne.org/primes/. For example, the most recently discovered Mersenne prime can found at: http:// www.mersenne.org/primes/digits/M74207281.zip. You'll need to download the ZIP file and unzip it to access the text file.

Sample Run:

Command Prompt$ ./a.out M74207281.txt

0s: 2233259

1s: 2233437

2s: 2234193

3s: 2232135

4s: 2232328

5s: 2236279

6s: 2234254

7s: 2233628

8s: 2234257

9s: 2234848

Total: 22338618

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!