Name: ____________________________________________________ Alpha: _____________________

Describe help received: _________________________________________________________________

The prime counting function π(N) is defined to be the number of prime numbers less than or equal to N. Write a program that reads an integer N from the command line and prints out π(N).

~$./a.out Enter an integer: 25 The prime counting function of 25 is 9. ~$ ./a.out
Enter an integer: 107
The prime counting function of 107 is 28.

As you write this program, try to make use of the process of stepwise refinement that we discussed in lecture.

Turn in this page, along with a printout of your code (using codeprint) and a screen capture showing it run on the above examples.