Question
Write a program in c# named averages that includes a method that accepts any number of numeric parameters, displays them, and displays their average. Demonstrate
Write a program in c# named averages that includes a method that accepts any number of numeric parameters, displays them, and displays their average. Demonstrate that the method works correctly when passed one, two or three numbers, or an array of numbers.
Note: The program should use the following data:
Three list of numeric values-the ones seen in parenthesis
One array of numeric values-the ones seen in square braces
Also please note that the user should have the ability to input any values they want into the program and have the program find the average of the elements.
Sample output--------
For the list (3) the average of its elements is : 3.00
For the list (12,15) the average of its elements is 13.50
For the list (22.3,44.5,88.1) the average of its elements is 51.63
For the list [3,4,5,6,7,8] the average of its elements is 5.50
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started