#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> #include <string.h> #include <windows.h> #include <stdlib.h> int main() { /*呈现效果 * ################ * a##############! * ay############!! * ...... * ayuexuexi C !!!! */ int x = 0; int y = 0; int n = 0; char arr1[] = "ayuexuexi C !!!!"; char arr2[] = "################"; n = sizeof(arr1) / sizeof(arr1[0])-2; for (x = 0, y = n; x <= y; x++, y--) { arr2[x] = arr1[x]; arr2[y] = arr1[y]; printf("%s\n",arr2); //间隔一秒输出 Sleep(1000); //每执行一条,清空屏幕 system("cls"); } }
效果图为动态图
标签:ayuexuexi,int,代码,练习,char,改进,arr1,sizeof,include From: https://www.cnblogs.com/ayue6/p/17741225.html