Location of Max element…

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int DATA [10] = {10,12,9,7,2,3,5,25,30,23};
int K=1,LOC=1 ,N=10 , MAX=DATA[0];

while(1)
{
K=K+1;
if(K>N)
Console.Write(“Man element” + “MAX”+ “LOCATION” + “LOC” );
break;}
if(MAX<DATA[K])
{
LOC=K;
MAZ=DATA[K];
}
Console.ReadLine();
}
}
}

Advertisements

2 thoughts on “Location of Max element…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s