目录
演示多个字符从两端移动,向中间汇聚。
#include<stdio.h>
int main()
{
char a[] = { "hello world!!!!!" };
char b[] = { "#################" };
int right = sizeof(a) / sizeof(a[0]) - 2;
int left = 0;
while (left <= right)
{
b[left] = a[left];
b[right] = a[right];
printf("%s\n", b);
left++;
right--;
}
return 0;
}
这种打印效果太快,是