Question: LACILISE 6-6 Search | Instructions >_Terminal Write a program named Averages that includes a method named Average that accepts any number of numeric parameters, displays

 LACILISE 6-6 Search | Instructions >_Terminal Write a program named Averages

LACILISE 6-6 Search | Instructions >_Terminal Write a program named Averages that includes a method named Average that accepts any number of numeric parameters, displays them, and displays their average. Averages.cs 1 using static System.Console; public class Averages 3 4 public static void Main() 5 { 6 double[] array = {3, 4, 5, 6, 7, 8); 7 Average(3); 8 Average(12, 15); 9 Average (22.3, 44.5, 88.1); 20 Average(array) 11 } 12 13 public static void Average (params double[1 nums) 14 { double total = 0; 16 double avg; For example, if 7 and 4 were passed to the method, the output would be: 15 17 foreach(double number in nums) 18 7 4 Average is 5.5 19 Write("{0}", number); total number 20 Test your function in your Main(). Tests will be run

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!