hallow world 你还在有初学的输入方式吗?
想不想换一种逼格跟高的了?
#include<stdio.h> #include<windows.h> int main() { char arr1[] = "hallo world"; char arr2[] = "***********"; int left = 0; int right = sizeof(arr1) / sizeof(arr1[0])-2; while (left <= right) { arr2[left] = arr1[left]; arr2[right] = arr1[right]; system("cls"); printf("%s\n", arr2); Sleep(100); left++; right--; } system("pause"); return 0; }