UMBC CMSC104 CSEE

Project 2

Requirements Specfication

Write a program that will ask the user for a dollar amount and then have the program tell the user how many dollars and how many coins that is. Name the source code file jdoe2p2.c.

Example Output

In the following example, the program displays what is in Blue and the user types what is in Red. Remember that this has to work for any dollar amount.

Enter an amount of money: 9.48

9 Dollars
1 Quarter
2 Dimes
0 Nickels
3 Pennies

There will be five percent (5%) extra credit if your program correctly prints out the singular or double form of the coin's name:

1 Quarter instead of 1 Quarters

Program Header Comment Block

Use the following comment block at the beginning of your source code:
        /*****************************************************/
        /* Program Header Block                              */
        /* Filename:       jdoe2p2.c                         */
        /* Name:           Ima Student                       */
        /* email address:  jdoe2@umbc.edu                    */
        /* Date:           16 Oct 2006                       */
        /* Course/section: CMSC-104/0101                     */
        /* Description:                                      */
        /*     Analysis:                                     */
        /*         Input:                                    */
        /*         Output:                                   */
        /*         Constraints:                              */
        /*         Formulas:                                 */
        /*         Assumptions:                              */
        /*     Design:                                       */
        /*         (Your psuedocode goes here.)              */
        /*                                                   */
        /* Notes:          (As needed.)                      */
        /*****************************************************/


UMBC CMSC104 CSEE | CMSC104 | Lectures