namespace sort_by_pebble_method
public static void Main(string[] args)
Console.Write("Number of the elements of the massive: ");
int N = int.Parse(Console.ReadLine());
Console.WriteLine("=======================================");
double[] a = new double[N];
for (int k = 0; k < N; k++)
Console.Write("a[" + (k + 1) + "] = ");
a[k] = double.Parse(Console.ReadLine());
for (int k = 1; k < N; k++)
for (int j = 0; j < N - 1; j++)
if (a[j] > a[j + 1]) { pom = a[j]; a[j] = a[j + 1]; a[j + 1] = pom; }
Console.WriteLine("=======================================");
for (int i = 0; i < N; i++)
Console.WriteLine("a[" + (i + 1) + "] = " + "{0,4}", a[i]);
Console.WriteLine("=======================================");
Console.WriteLine("Result after the change:");
Console.WriteLine("=======================================");
for (int k = 0; k < N; k++)
Console.WriteLine("a[" + (k + 1) + "] = " + "{0,4}", a[k]);