找错误了,弟兄们
#include<conio.h>#include<stdio.h>
main()
{
int n,k,xx[20];
int i,j,t;
printf("\nPlease enter a number:");
scanf("%d",&n);
printf("\nPlease enter %d numbers:",n);
for(i=0;i<n;i++) scanf("%d",&xx[i]);
printf("\nPlease enter another number:");
scanf("%d",&k);
for(i=0;i<k;i++);
{
t=xx[0];
for(j=1;j<n;j++)
xx[j-1]=xx[j];
xx[n-1]=t;
}
printf("\nAfter moving:\n");
for(i=0;i<n;i++)
printf("%3d",xx[i]);
printf("\n");
}
本意是输入7和1234567再输入5会输出6712345可是结果却是2345671