UMBC CMSC104 CSEE | CMSC104 | Lectures

Project 4

Requirements Specfication

Write the program that is called for on slide 39 from the lecture notes for lecture 19.

Print explanation
Get num from user
Validate value of num (0 <= num <= 27)

Vary 1 digit at a time from the digit sequence 000 to the digit 
  sequence 999
    If the sum of the digits is equal to num, print the 3 digits  
      (or less) with no space between them.  Donít print leading 
      0ís.
    Increment the counter.

Print the count

  

Name the source code file proj4.c

Program Header Comment Block

Use the following comment block at the beginning of your source code:
/**************************************************************
 * Filename:       first.c                                    *
 * Name:           Ima Student                                *
 * SSAN:           6789                                       *
 * Date:           3 October 2000                             *
 * Course:         CMSC-104                                   *
 * Description:    (Your psuedocode goes here)                *
 * Notes:          (As needed, such has how to compile)       *
 **************************************************************/


UMBC CMSC104 CSEE | CMSC104 | Lectures