Finding average of array elements - c# program, DOT NET Programming

Finding Average of Array Elements - C# Program

I need assignment help for Finding Average of Array Elements in C#. Can anybody send me there ideas?

Posted Date: 2/12/2013 1:09:55 AM | Location : United States

Hey you should implement the below code in your assignment. This is a very easy example, try it once.


using System;  

class ArrayFunction


  public static void Main()


   long Largest;

   double Average;

   int c;

   int num;

   int[] array1;     

  Console.Write("Enter the number of Elements in an Array : ");    


  array1=new int[c];    

   for (int i=0 ; i>c ;i++)


   Console.WriteLine("Enter the element " + i);




   foreach (int i in array1)


   Console.Write(" " + i);


  Console.WriteLine ();  

  Largest = Large(array1);

  Average = Avg(array1);  

  Console.WriteLine ("\n The largest element in the array is " +     Largest);

  Console.WriteLine ("The Average of elements in the array is " +    Average);



  static double Avg (params int [] arr)


   double sum=0;  

   for ( int i = 0; i < arr.Length; i++)


   sum = sum + arr[i];


  sum = sum/arr.Length;   




Posted by Damon | Posted Date: 2/12/2013 1:11:28 AM

Related Discussions:- Finding average of array elements - c# program, Assignment Help, Ask Question on Finding average of array elements - c# program, Get Answer, Expert's Help, Finding average of array elements - c# program Discussions

Write discussion on Finding average of array elements - c# program
Your posts are moderated
Related Questions
I want .Net Programmer for custom grid web application Need programmer to support in the development of an ASP .Net interface. Project will make extensive utilize of custom grid

WDS and MDT Deployment Server Training Project Description: I'm seeking someone who can Teach/Train me with MDT and WDS server. This Can be online teaching courses. I will

Data hiding and encryption would be done on images. Both these process should have a data hiding key and an encryption key correspondingly. Another user should be able to decrypt t

Can a .NET web application consume Java web service? Yes Offcourse.Actually Webservices are independent  to language. It depends on WSDL and SOAP. so any one can develope the W

Project Description: We need to construct services in C# or VB.NET that can manipulate with a Targin TIP Protocol Server (protocol for financial information exchange), receive d

Question: (a) What is VB.NET 2005 and explain the versions of VB.NET. Name the four different types of applications that new version of VB.NET can create. (b) Using the

HWID Spoofed for Windows 7, 8 x64 Project Description: I require a simple program that will spoof my hardware id. I could be able to write the id to spoof to in the program a

Project Description: We are seeking a simple tool that can convert an existing flash file (.SWF) into HTML5. Our idea is to convert small flash games into html5 games. Please NO

Project Description: We require some routines written in C# (.NET) to: * Parse several RESTful APIs to change and push data to RabbitMQ * Pop objects from RabbitMQ and inp

What are the advantages of Distributed Processing? Benefits of distributed programming are:- a. Security/Encapsulation b. Faster Problem solving c. Distributed databas