CS167 C Programming
Spring 1998
The wood-screw inventory
Goals
To write a program that uses a single array of integers, and functions to contain subtasks.
Problem description
Write a C program that keeps an inventory of different sizes of wood-screw. The sizes are 4, 6, 8, 10, and 12. Assume all the screws are the same length, and made from the same material. The program should start from a zero inventory and be able to accept input in the form of a screw size and an amount by which to increase or decrease (if negative) the holding of that size of screw. The cost of each supply item is constant and is hard-coded in the program. At the end of the input, a list of screw sizes, their amounts and the total money worth of the inventory should be printed.
Procedure
Follow these steps to end up with a successful program:
4 $0.30
6 $0.35
8 $0.45
10 $0.50
12 $0.65
Deliverables:
6 1000
4 500
12 100
8 -255
4 -62
10 -720
8 500
4 100
9999 0
Notes and hints
Due Date
Submit your completed assignment before 5pm. on Friday March 20th.