Question: USE C++ ONLY! PLEASE WRITE PROGRAM THEN FILL IN THE TEST TABLE! THANK YOU Write a program that calls a function calculateSum, which calculates the

Write a program that calls a function calculateSum, which calculates the sum of numbers from -5 to N. The function calculateSum has one parameter N of type integer and returns the sum as an integer. Write another function calculateAverage that calculates the average of the summed numbers. This function will have two parameters: the sum (from calculateSum) and the number of items summed. It returns the average as a floating point number. The main function should be responsible for all imput and output. Your functions will only calculate and return the values and NOT print anything. N is provided by the user; user input must be asked for repeatedly until a non-negative integer is provided. Test Table: Add / delete rows from Test Table as necessary Modify column widths as necessary Test both valid and invalid input Test for every output expected If failure is an expected output and it happens then that test Passes Any test that fails means the program must be fixed so that it passes the test - Failing tests need a new test row, ie la, 1b, etc, showing corrections from original
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
