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:
- Your name
- Your email address
- Which program the source code is for
- 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
- Program 1
Write a program that prompts the user for 3 integer numbers. Then,
- Calculate the minimum and maximum numbers and output them as
such
- Calculate the average of the three numbers
(with precision!) and output that
- 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!
- 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.