#include
#include
#define N 80
void fun1(char *w)
{
int i; char t;
t=w[0];
for(i=0;i
w[strlen(w)-1]=t;
}
void fun(char *w, int m)
{
for(int i=0;i
fun1(w);
}
}
void main() //改为改过改为改过改为改过
{
char a[N]= "ABCDEFGHIJK";
int m;
printf("The original string:\n");puts(a);
printf("\n\nEnter m: ");scanf("%d",&m);
fun(a,m);
printf("\nThe string after moving:\n");puts(a);
printf("\n\n");
}
//改过两个地方,上面程序中已标注出。
void fun(char *w, int m)
{
for(int i=0;i
fun1(w);
}
}