Assignment 4 - CSC180 Assignment 4 Fall 2006 Due: Tuesday,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSC180 Assignment 4 Fall 2006 Due: Tuesday, November 14 by 10:00am Instructions: You are to write a C program for each problem below. Each of your C programs must go in a separate file. Because we will be compiling and running your tests with automatic scripts, it’s very important that your files are named in a very specific way: the file for problem 1 should be named a4p1.c , the file for problem 2 should be named a4p2.c , and the file for problem 3 should be named a4p3.c . All letters in the filenames must be lower-case. All your files will be submitted electronically. Your programs must accept input data in the order and format specified in each problem statement, and your programs must terminate as indicated in the problem statement. These rules allow us to test all programs with the same input data and return your work in a timely manner. If you have any questions about format or termination, please ask rather than assume. We will be letting you use library functions and arrays on this one. While this does give you more freedom, you need to be careful that you’re not trivializing your answer (e.g. for problem 4 on assignment 1, using the fabs() function would have trivialized your code) or making it unnecessarily complicated. Functions: The programs you write for this assignment should probably contain multiple functions, since they will be large enough that it would not be appropriate to write all the code in a single main function. In most cases, it is part of your task to think about the organization of the functions, to determine the number of functions you will use, and to determine the input parameters and return values. You should write good documentation for each of your functions, including the function’s name, purpose, preconditions and postconditions. (As with assignment 3, I won’t insist on you including the accepts and returns fields of the function comments.) Input data: Since the programs in this assignment require a lot of (rather fiddly) data entry, you may find it convenient to feed data to your program via input redirection, as was introduced in Lab 4. This can be
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Assignment 4 - CSC180 Assignment 4 Fall 2006 Due: Tuesday,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online