Goals for this Warmup

  • Practice programming with control, iteration, and recursion.

For this lab, you are welcome to get technical help from another student on how to use or install any of the tools involved. You may also get syntax help on C. On the warmup only, you may partner with one student (and document that collaboration on your warmup.c file) with whom you can discuss the algorithmic portion. You may not, however, get help on the algorithmic portion of the exercise outside of your collaborative partner, office hours or piazza questions to TAs or instructors. The homework itself has no partner.

This lab is broken down into several steps:

Set up

You should have already created a hw2 directory and completed the pre-lab (having created, added, and submitted warmup2.h warmup2.c warmup_main.c and Makefile).

You are being asked to write five functions. You can see the function descriptions in the prelab.

Submit

At this point, you should have done the following:
  • Checked out your repository
  • Created a folder named hw2 in your repository and run svn add hw2
    $ svn add hw2
  • Completed the following four files: warmup2.h, warmup2.c, warmup2_main.c and Makefile inside your hw2 directory.
  • $ svn add warmup2.h warmup2.c warmup2_main.c Makefile 
  • Compiled your executable manually and with the Makefile
  • Executed your code to make sure it runs properly and inspected the results.
  • $ svn commit -m "hw2 warmup complete"
Now you're ready to move on to hw2!! Remember that the homework is completed individually.