Department of Computer Science

Worcester Polytechnic Institute

- Problems/Exercises from the Textbook:

4.3, 4.5, 4.7, 4.8, 4.17, 4.19, 4.21 - Primitive recursive functions:
- Write a C program that implements the function "prime(n)" AS
YOU DEFINED IT in Quiz 3. (Quiz3 will be returned on Friday)
- Run your program for each of the following inputs:
Input:

0

1

2

7

8

35

101

17 - Hand in a printout of your program and the output produced
by your program for the inputs above
- If your program does not work, rewrite it until you obtain
a correct implementation of the "prime" function.
- Show that your correct implementation is primitive recursive.

- Write a C program that implements the function "prime(n)" AS
YOU DEFINED IT in Quiz 3. (Quiz3 will be returned on Friday)
- ADDITIONAL PROBLEMS FOR STUDENTS TAKING THIS COURSE FOR GRADUATE CREDIT: Problems/Exercises from the Textbook: 4.15, 4.18, 4.22