using System;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
double[] array = { 1.6, 0, 2.2, -6.1, 3.5, -1.2, -5, 5, -2, 1};
double c = 3.1;
int count = 0;
int maxIndex = -1;
double maxValue = double.MinValue;
for (int j = 0; j < array.Length; j++)
{
if (array[j] > c)
{
count++;
}
double temp = Math.Abs(array[j]);
if (temp > maxValue)
{
maxIndex = j;
maxValue = temp;
}
}
Console.WriteLine("Коллчиество чисел больших чем {0}: {1}", c, count);
double result = 1;
for (int j = maxIndex+1; j < array.Length; j++)
{
result *= array[j];
}
Console.WriteLine("Произведение чисел идущих после самого большого по модулю числа: {0}", result);
//Советую погуглить что такое сортировка "пузырьком" прежде чем сдавать прогу.
for (int j = 0; j < array.Length-1; j++)
{
for (int y = 0; y < array.Length-1-j; y++)
{
if (array[y] > array[y+1])
{
double temp = array[y];
array[y] = array[y+1];
array[y+1] = temp;
}
}
}
Console.WriteLine("Отсортированный массив");
for (int j = 0; j < array.Length; j++)
{
Console.WriteLine(array[j]);
}
Console.ReadKey();
}
}
}