for (int i = 0; i < c.Length; i++)
   { c[i] = rnd.Next(1, 50);
     Console.Write("{0} ", a[i]);}
Console.WriteLine();
Console.WriteLine("vstavka");
 for (int i = 1; i < c.Length; i++)
            {
               int x = c[i];
               int j = i - 1;
               while (j >= 0 && c[j] > x)
                {
                    c[j + 1] = c[j];
                    j--;
                }
                c[j + 1] = x;
            } 
Console.WriteLine();    
for (int i = 0; i < c.Length; i++)
Console.Write("{0} ", b[i]); 
Комментариев нет:
Отправить комментарий
Примечание. Отправлять комментарии могут только участники этого блога.