using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ARRAYINDEX
{
class Program
{
static void Main(string[] args)
{
double[] numbers = { 15.05, 58.3, 22, 95.55, 177.2, 46.65, 0.85 };
double maxNumber = numbers.Max();
int indexOfMaxNumber = Array.IndexOf(numbers, maxNumber);
Console.WriteLine("The index of max number in the array is {0}", indexOfMaxNumber);
Console.Read();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ARRAYINDEX
{
class Program
{
static void Main(string[] args)
{
double[] numbers = { 15.05, 58.3, 22, 95.55, 177.2, 46.65, 0.85 };
double maxNumber = numbers.Max();
int indexOfMaxNumber = Array.IndexOf(numbers, maxNumber);
Console.WriteLine("The index of max number in the array is {0}", indexOfMaxNumber);
Console.Read();
}
}
}
Comments
Post a Comment