CS 302 Assignment 1

Due date: Tuesday, January 24, 2006, 8:30 AM in class.

All programming assignments must be submitted electronically. Submit them to the graduate assistant, Premalatha Reguraman, on or before the due date.
All written assignments must be handwritten (not typed or printed from a computer file) in your own handwriting, on 8.5 by 11 inch paper, or on A4 paper. Write your name on each sheet, and do not fold the pages or crimp the corners. (You may use a paper clip or a staple.)
Turn the pages in to me or to the graduate assistant on the due date.
Work the following problems from your textbook:
  1. Problem 2.1 on page 64.
  2. Problem 2.7 on page 64.
    Measure time using counters, as explained in class. Use the following test values of N: 10, 100, 10000.
    There is programming component and a written component to this problem. The programming component must be emailed to the graduate assistant. You must include the source code, as well as the output with the test values of N.
    The written component must be handed in on paper.
  3. Problem 2.25 on page 67.