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

Design algorithm - refactoring, TASK - DESIGN ALGORITHM You are required...

TASK - DESIGN ALGORITHM You are required to design a suitable solution algorithm by using either structured chart, pseudocode or flowchart. This diagram should clarify the proce

How can you simple-bind controls at design mode, Question: (a) How can...

Question: (a) How can you simple-bind controls at design mode? (b) How can a blank record be created in a dataset bound to the controls in a Windows form? (c) Datagrid

Microsoft server and exchange, Project Description: I need to get lync s...

Project Description: I need to get lync server 2013 fixed the issues it has hit: 1) Can't connect to it outside network, I think small firewall problem with a little issue in

C# , I want to solve the assignments related to C# , ASP.net and Sql server...

I want to solve the assignments related to C# , ASP.net and Sql server

It governance definition, IT governance defined In this section, a shor...

IT governance defined In this section, a short literature survey will be conducted. The results will be presented in a final comparative table. Before starting defining IT gove

Samba pos development customisation english version, Project Description: ...

Project Description: customise samba pos. Just remove samba pos logo and rebrand it. The title in the frame needs to be changed as well as the splash screen at the beginning.

C#, 13579 3579 579 79 9 How to the logic in code. pls give me Ans.

13579 3579 579 79 9 How to the logic in code. pls give me Ans.

What is the use of a global.asax file in asp.net, Question: (a) Outlin...

Question: (a) Outline four classes that allow you to work with File Streams. (b) (i) What potential problem can arise when you change items stored in an Application State

I want a sportsbook platform, Project Description: We want to design and...

Project Description: We want to design and develop a new Sportbook Platform from scratch, subsequent functionality: - Have a full functionality like other similar websites (S

I need to duplicate a website, Duplicate a Website I need a customer man...

Duplicate a Website I need a customer management site Please help me out and what I need to get. I need all charteristics of above mentioned site a) Effects b) Mobil

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