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

Assignment Help:

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?


Related Discussions:- Finding average of array elements - c# program

What is strong-typing versus weak-typing, What is strong-typing versus weak...

What is strong-typing versus weak-typing? Which is preferred? Why? Strong type is checking the types of variables as soon as possible, usually at compile time. While weak typing

Component diagrams, Explain Component diagrams Package: - The Pa...

Explain Component diagrams Package: - The Package logically make group of element of a UML model. Component: - It is the actual physical module or implementation of

Project spending, Is spending in projects constant throughout the project? ...

Is spending in projects constant throughout the project? Generally in initial stage of projects (design and requirement phase) the cost is very less (as you require maximum bus

Human aimbot and csgo wallhack, Human Aimbot and CSGO Wallhack Need a CS...

Human Aimbot and CSGO Wallhack Need a CSGO hack which can Aimbot and wallhack realistically. Must be VAC Proof, and ESL proof, as well as Overwatch proof (in teh case of thei

Experienced outlook developer, About us in a nutshell: We are a young start...

About us in a nutshell: We are a young start-up that trade a refreshing product in the field of enterprise software and develops with the latest technologies. We love to partner wi

Audio expert in c# required and generate audio engine, Audio Expert in C# R...

Audio Expert in C# Required - Generate Audio Engine, Exciting Project! Project Description: We need an EXPERT CODER to help us create an 'audio engine' in C#. We need to b

What benefits have web services over component object model, What advantage...

What advantages have Web services over Component Object Model (COM) and Distributed Component Object Model (DCOM)? The benefits of Web services over COM and DCOM are as follow

What is the use of the connection object, What is the use of the Connection...

What is the use of the Connection object? The Connection object is used to connect your application to a specific data source by giving the needed authentication information in

What do you meant by the term pseudo-class as used in css, Question: (a...

Question: (a) Prepare a diagram which explains where the different elements like Form, Window and Document, belong in the Document Object Model hierarchy and how properties are

Targin protocol and stock market protocol, Project Description: We need ...

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

Damon

2/12/2013 1:11:28 AM

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

Program:

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 : ");    

  c=int.Parse(Console.ReadLine());    

  array1=new int[c];    

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

  {

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

   num=int.Parse(Console.ReadLine());

   array1[i]=num;

  }  

   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);

  Console.ReadLine();       

 }  

  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;   

   return(sum);

 }

}

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd