Be sure you have read (or at least skimmed) the assigned readings from chapter 5.
Do the following programming problems. You will end up with at least one code file per problem. Submit your program source (and any other needed files) by sending mail to bmassing@cs.trinity.edu, with each file as an attachment. Please use a subject line that mentions the course and the assignment (e.g., ``csci 1312 homework 3'' or ``CS1 hw3''). You can develop your programs on any system that provides the needed functionality, but I will test them on one of the department's Linux machines, so you should probably make sure they work in that environment before turning them in.
Some words about checking for non-numeric input: Doing a great job of ``validating input'' is probably outside the scope of this course -- it turns out to be not an easy problem to solve in C -- so in the programs you write for homework, generally speaking what I have in mind is for you to just check the return value from scanf, as I do in the examples in class, and bail out of the program if it indicates an error. You may be tempted to make your program prompt the user again, but don't do that either -- it breaks my semi-automated testing and again is not trivial to do in C. Just checking the return value from scanf is far from perfect but at least ensures that the variable(s) read from standard input have sensible values, which is good enough for our purposes right now.
Write a C program that prompts the user for the number of caps and prints the corresponding price. Of course(?), the program should print an error message and stop if input is not numeric or numeric but less than 0. The program should also print an informational message if the price would be the same for a larger number of caps (i.e., the number entered is less than the ``minimum'' order, or not a multiple of 5). It should also print a message if the order qualifies for the volume discount.