- Write a function that accepts two numeric parameters andreturns the average of the two numbers. The function should throwan exception if it is passed non-numeric parameters and encountererror in calculation.
- Demonstrate the use of this function by writing a simple driverprogram.
By the way the language is C++
Expert Answer
Answer to Write a function that accepts two numeric parameters and returns the average of the two numbers. The function should th…