COSC 1436 Lab 2

Purpose: This lab explores using a function to write data to a file.

Due: Section 2: Before class on February 5, 2013

Section 3: Before class on February 7, 2013

Requirements: Do the following:

1. Write a program that will write the prime factors of all the numbers from 1 to 1000 to a disk file. The specific requirements are as follows:

2. Your program must compile and run on clst.tamucc.edu.

3. This lab requires a lab report/documentation package. All of these items are not typically in the same file (source code and sample output should definitely be in their own files), but the main lab report file must reference each item by file name. Here is a sample lab report. The main lab report must either be a text file (with a .txt extension) or a Microsoft Word file (with a .doc or .docx extension). The lab report must includes the following or references (the file name that was attached to the mail) to the following information:

4. Submit this package via BlackBoard. Zip all of the required elements together into one file that will be submitted to BlackBoard:

  • The source code for your programs, called lab02***.cpp. Put your initials where the 3 asterisks appear. This files must be ready to compile using the standard g++ compiler on clst.tamucc.edu.
  • A digital copy of the program output.
  • A copy of your lab report in either a Microsoft Word document or a text file.
Grading Criteria: 100 points available for this lab.