Finding largest array element - c# program, DOT NET Programming

Assignment Help:

Finding Largest Array Element - C# Program

I am unable to make out the Largest Array Element in C# language. Can anyone suggest me any example for this.


Related Discussions:- Finding largest array element - c# program

To know a state of a thread, How can we know a state of a thread? The "...

How can we know a state of a thread? The "ThreadState" property is used to get complete detail of a thread. The Thread can have one or a combination of status.System.Threading.

A super-hero sharepoint developer with great design skills, A Super-hero Sh...

A Super-hero SharePoint developer with great design skills Project Description: US: Our start-up company prepares a very innovative and cool SharePoint related product with c

Project management, What is project management? Applying the knowledge,...

What is project management? Applying the knowledge, skills, techniques, tools in project and deliver project deliverable is a short definition of the project management. It's b

I need c# api for bitfinex, I need C# API for bitfinex Project Descripti...

I need C# API for bitfinex Project Description: Hi, I need a developer to build a library in C# that connects to the bitfinex API. The library must implement all the authenti

How to prevent .net dll to be decompiled?, Prevent .NET DLL to be decompile...

Prevent .NET DLL to be decompiled By design phase .NET embeds rich Metadata inside the executable code using the MSIL. Anyone can easily  decompile DLL back using tools such as

Vb.net and livecycle form, We have a VB.NET application to organize the edi...

We have a VB.NET application to organize the edition and creation of dynamic PDF forms (fishing trip logsheet). The fishing vessel parameters are entered once for good in this VB.N

Web portal development, Project Description: Looking for a developer who...

Project Description: Looking for a developer who will develop a web portal like zulutrade, some features will be taken from signaltrader The changes would be like: 1) Only

I am seeking to get a logo design for a business, I am seeking to get a log...

I am seeking to get a logo design for a business. Skills required: .NET, HTML, Graphic Design, PHP, Website Design

What is the difference between int and int32, What is the difference betwee...

What is the difference between int and int32. There is no difference among int and int32. System.Int32 is a .NET Class and int is an alias name for System.Int32.

Costing, how much guys cost for small 5 pages website designing in .net?

how much guys cost for small 5 pages website designing in .net?

Aana

2/12/2013 1:05:57 AM

This program will help you, try it out

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

 }  

  // Determining the largest array element   static int Large (params int [] arr)

 {

   int temp=0;  

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

  {

    if (temp <= arr[i])

   {

    temp = arr[i];

   }

  }

   return(temp);

 }

}

Alice

2/12/2013 1:07:39 AM

As a C# beginner, this is the first time out of at least three previous tried ?that, I can finally understand how can i Find largest array element. Thank You so much.

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