

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Homework Assignment 2 Due Monday, October 8, 2007, at midnight.
While you may discuss this assignment with others, all work you submit must be your own. That means, after discussing it, you must go back and write it up yourself.
Here are the steps of the Software Development Process that we used in Homework 1:
Software Development Process:
Part I:
Part II:
Follow the above steps to write C programs for two problems:
Program 1: Sixes and Sevens: Write a program that tests every integer between 1 and 100, and if the number divides evenly by 6 or by 7, print it out with a message.
Program 2: 99 Bottles: As a way to pass the time on long bus trips, young people growing up in the United States have been know to sing the following rather repetitive song: 99 bottles of beer on the wall, 99 bottles of beer, You take one down and pass it around, 98 bottles of beer on the wall.
98 bottles of beer on the wall …
Write a C program to generate the lyrics to this song. Ask the user for input for how many verses to print. Since hardly anyone ever actually finishes the song, it is not clear what the last verse is, but it should be different from the others. Perhaps it ends: 1 bottle of beer on the wall, 1 bottle of beer, You take it down and pass it aroung, Now there are no more bottles of beer on the wall.
In testing your program to produce output to hand in, please use a small number of verses
What to hand in:
Each program must have: a) One txt, rtf or word document with all of Part I of the development process. b) The .c file with the C program (do not hand in the project or solution files). c) One text file, with sample runs that you copied and pasted from the Console window. These should include the test runs described in part 3.
Submit these as three separate files to the Assignment 2 page in Blackboard.