#include <stdio.h>
void fix(int *a,int n,int m)
{
int temp[10];
int i,j = 0;
for (i = n-m; i < n; i++)
{
temp[j] = a[i];
j++;
}
for ( i = n - m - 1; i >= 0; i--)
{
a[i + m] = a[i];
}
for ( i = 0; i < m; i++)
{
a[i] = temp[i];
}
}
int main()
{
int a[50];
int m, n,i ,*p;
printf("please enter n,m:");
scanf("%d%d", &n, &m);
printf("please enter shuzu:");
for ( i = 0; i < n; i++)
{
scanf("%d", &a[i]);
}
fix(a, n, m);
for ( p=a;p<(a+n);p++)
{
printf("%d ", *p);
}
return 0;
}