Skip to content

BenLPope/Fork_Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Fork_Example

This program takes in 1 argument between 1 and 49 and finds the sum of the primes found. It will find the number of primes you designate. It uses a Sieve of Eratosthenes to find primes. Could be updated to add primes found during the run to the sieve.

Example of program usage:

a.out 2

Output of example:

  CHILD: The sum of the first 2 prime numbers is: 5
  CHILD: My PID is 16056 and it took me 462ns
  PARENT: Child PID is 16056 and the child finished in 462ns
  PARENT: My PID is 16055 and I finished in 4811ns
  PARENT: The first 2 prime numbers are...
  2
  3
  End of list. Program terminating.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages