-
- Declare 5 integers in
main
.(
)
- Declare 5 integers in
-
- Prompt for and read five integer marks in
main
.(
)
- Prompt for and read five integer marks in
-
- Write and use a value returning function with five integer parameters to calculate and return the average to the calling function,
main
.(
)
Here is a partial prototype for you to use:avg ( int , int , int , int , int ) ;
Be sure the calculation in the function produces decimal places for a more precise average. You must determine a return type that will preserve those decimal places.
- Write and use a value returning function with five integer parameters to calculate and return the average to the calling function,
-
- Print the average in the
main
function.(
)
- Print the average in the
-
- Compile and run the C++ program.
- Test the program with an input guaranteed to produce decimal places. For example:
Please enter 5 integer marks: 1 2 1 1 1 The average of those marks is: 1.2