CSE 271: Programming Assignment 1
Assigned: 24 January 2007
Due: 29 January 2007
Abstract
Using emacs, write a C program that generates the product of a list of
integers.
Details
Use the standard C library functions scanf(3C) and
printf(3C)
to read a series of integers from one or more lines of standard input
(terminated by EOF or
a non-integer) and output their product. A properly implemented program will
work as follows:
tritan:~% ./product
1 2 3 4 5
<CTRL-D>Product: 120
tritan:~% ./product
12
982
-12
end
Product: -141408
tritan:~%
Submission Requirements
- As usual, the program must be named p1.c and must reside in the
cse271.071/p1 subdirectory.
- Create and use an appropriate Makefile that will compile your program
using make, and will clean the directory with make
clean.
- Your name and date must be in the comment section.
- Do a touch DONE when the program is ready to be collected.
Last revised: 20 January 2007.