当前位置:网站首页>实现“ 字体逐渐展现 ”程序
实现“ 字体逐渐展现 ”程序
2022-04-22 07:50:00 【圣喵】
在实现字体逐渐展现程序之前,我想介绍两个库函数给大家认识:
- 清空输出屏幕函数
system("cls"),需要引用#include<stdlib.h>头文件 - 延时函数
Sleep(1000),需要引用#include<windows.h>头文件,且其中1000表示延迟1000毫秒。
下面是实现的代码:
#include<stdio.h>
#include<string.h>
#include<windows.h>
#include<stdlib.h>
int main()
{
char arr1[] = "hellow world!!!!!!";
char arr2[] = "##################";
int left, right;
left = 0;
right = strlen(arr1)-1;
while (left <= right)
{
arr2[left] = arr1[left];
arr2[right] = arr1[right];
printf("%s\n", arr2);
Sleep(1000);
system("cls");
left++;
right--;
}
printf("%s", arr2);
return 0;
}
最后实现效果为:


这份博客如果对你有帮助,给博主一个免费的点赞以示鼓励欢迎各位点赞评论收藏️,谢谢!!!
如果有什么疑问或不同的见解,欢迎评论区留言欧。
版权声明
本文为[圣喵]所创,转载请带上原文链接,感谢
https://blog.csdn.net/m0_66769266/article/details/124240091
边栏推荐
- Pointer and array (detailed operation)
- sql 中对varchar类型进行求和(sum)方法 (类型报错)
- Cesium collects terrain height and model height (asynchronous method, suitable for more data)
- Hyperledger Fabric1.4环境搭建及示例测试
- Client and server communication project 5: LS command in C language
- 解决办法Access denied for user ‘root‘@‘localhost‘ (using password: YES)
- 聚看点 (详细版) 吃低保 每天几毛 青龙
- The pit encountered in the compilation and installation of pinpoint of win system will be shared with you
- Mapbox sets the official map language to Chinese
- 101. Symmetric binary tree (easy)
猜你喜欢

"Unexpected" operation in SQL statement

PCIe learning - Introduction to PCIe bus architecture: transaction layer - data link layer - physical layer (8)

Linux(CentOS)下安装 PostgreSQL

Level 3: node status check, data view and update

win10安装Mongo出错Service ‘MongoDB Server’ failed to start

工业缺陷检测项目实战(四)——基于HRNet的陶瓷缺陷检测

Matlab tip: to use 'xxx function', you must authorize, install and enable the following products: XXX toolbox

服务器设置自动开机及定时开机

tar 源码包管理-源码包安装方法

@ data annotation in idea, get / set method does not work
随机推荐
ROM、RAM、SRAM、DRAM、Flash、SDRAM区别
require-dev.mikey179/vfsStream is invalid, it should not contain uppercase characters. Please use m
Postgres + PostGIS + GeoServer offline path planning function (record)
初识C语言~分支语句
初识C语言~循环语句
详解转义字符
Operation steps for mysqlbin log playback
Single page application
大于/小于/等于 的缩写(sql数据库的简写包括mangodb)
Fabric test example, encountered order exited (x) x seconds
Tissu hyperledger 1. 4 construction de l'environnement et essais d'échantillons
Cesium realizes the monomer of buildings (divided into buildings and layers)
微信小程序手机号码如何进行解密
Level 1: node monitoring mechanism
HyperLedger Explorer 0.3.9环境搭建
String replacement
安卓开发——SQLite和SQLiteDatabase应用实验6笔记
Aircrack 破解无线网密码 (跑字典法)
一棵开始成长的树
sentinel服务监控系统搭建