Int[] arr = new int[] { 3, 2, 1, 5, 6 };
int min = arr[0];
int min_ind = 0;
for(int i=1;i { if (arr[i] < min)
{
min = arr[i];
min_ind = i;
}
}
for (var i = min_ind+1; i < arr.Length; i++)
arr[i] = 0;
for (var i =0; i < arr.Length; i++)
Console.Write(arr[i]+" ");
Console.ReadKey();