
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!

Create a directory called “PG1” at the top level of your shared folder. Put all your materials pertaining to this assignment in PG1. Put a make file called “Makefile” in this folder. The make file should correctly compile all of the programs described below.
Write a second program in C++ that asks the user for an integer. It should read in the integer and then execute the first program on that integer. That first program should then return whether the integer was prime. The second program should then print out an appropriate text string indicating whether the integer so entered was prime. This program should be called “pg1-1b.cc”, and the executable should be called “pg1-1b”.
Note: The second program does all the input and output. The first program does all the computation.
Neither of these programs should use the “system” command. Use low-level calls only.
When you are ready for your program to be graded, put a (possibly empty) file in your PG folder called “DONE”. I will remove this file after I grade your submission.