int main7()//
{
int a[5] = {2,3,1,4,5};
int len = sizeof(a)/sizeof(a[0]);
int i,j,get,d=len;
do
{
d=d/3+1;
for(i=1;i<len;i++)
{
get = a[i];
j = i-d;
while(a[j]>=get && j>=0)
{
a[j+d] = a[j];
j= j-d;
}
a[j+d] = get;
}
}while(d>1);
printA(a,len);
}
{
int a[5] = {2,3,1,4,5};
int len = sizeof(a)/sizeof(a[0]);
int i,j,get,d=len;
do
{
d=d/3+1;
for(i=1;i<len;i++)
{
get = a[i];
j = i-d;
while(a[j]>=get && j>=0)
{
a[j+d] = a[j];
j= j-d;
}
a[j+d] = get;
}
}while(d>1);
printA(a,len);
}