Lab Assignment 2

You are to write the following three programs. For each program, print out your source code, and hand it in to myself before you leave. In addition, email me a copy of each source file. You may send me a single email with each source file attached, or three seperate emails.

IMPORTANT NOTE: Each source file you print out should have the following at the top of the file, in comments:
  1. Your name
  2. Your email address
  3. Which program the source code is for
  4. A description of the problem and your solution
Also, for every variable you declare in each of the 3 programs below, provide comments in your source code describing what purpose they were declared for, and why they are the types you assigned. Nothing lengthy is required here; once sentence for each will do.

Working with Control Structures

  1. Program 1 Write a program that prompts the user for 3 integer numbers. Then,
  2. Program 2 Just to make sure you can work with complicated chained/nested control structures, extend Program 1 to work with 4 numbers.
    NOTE: Remember that you must submit a copy of both program 1 and this program, so create a seperate project for this!
  3. Program 3 Again, we'll extend Program 1 (not 2) to include the following output. If any of the 3 input numbers are repeated, then report which numbers are repeated and how many times.
    NOTE: Again, remember that you must submit a copy of both program 1 and this program, so create a seperate project for this! program.