#include<stdio.h>
#include<stdlib.h>
#include<Windows.h>
int main()
{
char arr1[] = "I love you forever!";
char arr2[] = " ";
int left = 0;
int right = sizeof(arr1) / sizeof(arr1[0]) - 2;//计算字符串数字的大小,减二为右下标
//
while (left <= right)
{
arr2[left] = arr1[left];
arr2[right] = arr1[right];
printf("%s\n", arr2);
Sleep(1000);//睡眠
system("cls");//清屏
left++;
right--;
}
system("pause");
return 0;
}
C||表白程序
最新推荐文章于 2024-07-06 03:09:20 发布