

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Assigned: Wednesday, Oct 15th, 2008
two prime numbers. For example, 4= 2 + 2, 6 = 3 + 3, 8 = 3 + 5, etc. Extensive computer experiments have found no counterexample, but no proof has been found. Write a program that will confirm this conjecture for all even numbers (greater than two) between n and m, where n and m are input by the user. Note that the number 1 is not considered a prime number for this exercise. Save your program in a file called p1.c. Your program must use a function to determine whether a number is prime or not.
Example 1: Enter the value of n: 2 Enter the value of m: 12 4 = 2 + 2 6 = 3 + 3 8 = 3 + 5 10 = 3 + 7 12 = 5 + 7
Example 2: Enter the value of n: 1 Enter the value of m: 17 4 = 2 + 2 6 = 3 + 3 8 = 3 + 5 10 = 3 + 7 12 = 5 + 7 14 = 3 + 11 16 = 3 + 13
Example 3: Enter the value of n: 200 Enter the value of m: 220 200 = 3 + 197 202 = 3 + 199 204 = 5 + 199 206 = 7 + 199 208 = 11 + 197 210 = 11 + 199 212 = 13 + 199 214 = 3 + 211 216 = 5 + 211
Instructions for submitting Assignment 8
Let’s say you have stored your files in assign8 directory your “rain” machine.
cd assign ls p1.c
tar cvf assign8.tar p1.c ls p1.c assign8.tar ….