Declare 5 integers inmain().Prompt for and read five integer marks inmain().Write and use a value returning function with five integer parameters to calculate and return the...







  • Declare 5 integers in


    main


    (


    )


    .



  • Prompt for and read five integer marks in


    main


    (


    )


    .



  • 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.



  • Print the average in the


    main


    (


    )


    function.



  • 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











Mar 11, 2023
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here