void ShellSort()
{
    int i;
    int j;
    int gap;
    int k;
    char x;
    char a[4];

    a[0] = 5; a[1] = 3; a[2] = 2; a[3] = 1;

    for (k=0; k < 4; k++)
    {
      gap = a[k];
      for (i=gap; i < ARRAYSIZE; i++)
      {
        x = Vektor[i];
        for (j=i-gap; x < Vektor[j] && j >= 0; j=j-gap)
          Vektor[j+gap] = Vektor[j];
        Vektor[j+gap] = x;
      }
    }
}