#include"stdio.h"
#define N 17
void main(){
int a,b,temp,i,j,k,l,m,n;
int num[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
int *ptr;
printf("开始元素序号:");
scanf("%d",&a);
printf("报几出列:");
scanf("%d",&b);
ptr=&num[a-1];
for(i=0;i
ptr=num;
}
ptr++;
if(ptr>&num[N-1-i]){
ptr=num;
}
}
temp=*ptr;
m=ptr-&num[0];
n=&num[N-1]-ptr;
for(k=m;k
}
num[N-1]=temp;
}
for(l=0;l
}
printf("\n");
}