Programming Assignment
Functions & Files
Your main function should call the function printMyName which will print out your name and a description of the program (see details below)
Next, in a while loop you should do the following:
- read in three integers
- print out all three numbers to your output file (hw3.out).
- call the function findLargest, which will return the largest of the 3 values.
- call the function findAverage which will return the average of the three numbers.
- print out the largest and average of the three numbers.
- Do this loop again i.e. print a nice message asking "Continue(y or n)?"
Here is the description of the three functions:
- printMyName - This function will not return anything and will have no parameters. It will print your name and a description of the program to your Output File.
- findLargest - will take in three integer parameters, and return an integer, which is the largest of the three numbers.
- findAverage - will take in three integer parameters, and return a double, which is the average of the three numbers.
Your output file should be called hw3.out.
Hand in your program, input, and output file.
THE FOLLOWING INSTRUCTIONS
MAY BE HELPFUL IF YOU ARE HAVING TROUBLE WITH THIS ASSIGNMENT.
Do your assignment in the following stages:
A. HW A - Write this program, and have all the output go to the screen.
B. HW B - Modify program A. Have all the output go to a file called hw3.out.