CS60 Homework Assignment 3 -------------------------- Due: Fri, Oct 3rd at 1:00pm Write a program that is a prime number sieve. For this assignment, you will need to include, using the '#include' preprocessor directive, the file "hw3numbers.h" located on the course website. To include a file in the same directory as your source code, the following line should be placed near the beginning of your program: #include "hw3numbers.h" This file contains a one dimensional array of 10 integer values. The array variable is called 'numbers' and is defined as follows (you should look at "hw3numbers.h" to see the array definition): int numbers[10] = {num1, num2, num3, ...}; Where there are actual integers in place of 'num1', 'num2', etc. For each of the number in the array, your program must decide if the number is prime. As a reminder, a number is prime if it's only divisors are 1 and itself. The simplest way to decide non-primality for a given number x is to try dividing x by every number from 2 to x-1 and checking if the division resulted in a remainder of 0 (HINT: use the modulo operator). If a number is found to be prime, your program must simply print out the number and a message indicating its primality. HINT: There are 3 numbers in the group that are prime. Sample Output --------------- [nurmi@localhost hw3]$ gcc hw3.c; ./a.out is Prime! is Prime! is Prime! [nurmi@localhost hw3]$ Of course, your program should print out the actual numbers instead of ! Extra Credit (1 pt.) ------------------- Instead of including the "hw3numbers.h" include the "hw3numbers_extra.h" file, which contains a two dimensional array of numbers instead of a one dimensional array of numbers. You will need an extra nested loop to iterate over the two dimensional array, otherwise the program should be the same as above. HINT: there are 12 prime numbers in the two dimensional array.