| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1062 人关注过本帖
标题:《从前慢》歌词输出在这里(延时输出)
只看楼主 加入收藏
dongcheng062
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2017-10-8
收藏
 问题点数:0 回复次数:3 
《从前慢》歌词输出在这里(延时输出)
#include <iostream>
 #include <windows.h>
 #include <string>
 using namespace std;
 int main()
 {
     string str = "洪尘:《从前慢》";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(110);
         cout<<str[i];
     }
     cout<<endl;
     str="词:木心,曲:刘胡轶";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(110);
         cout<<str[i];
     }
     cout<<endl;
     str="记得 早先 少年时  大家诚诚恳恳    ";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(200);
         cout<<str[i];
     }
     cout<<endl;
     str="说一句     是一句   ";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(200);
         cout<<str[i];
     }
     cout<<endl;
     str="清早    火车站  长街黑暗无行人  卖豆浆的小店冒着热气";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(200);
         cout<<str[i];
     }
     cout<<endl;
     str="从前的  日色变得慢   车 马 邮件都慢 ";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(200);
         cout<<str[i];
     }
     cout<<endl;
     str="一生只够   爱一个人    ";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(200);
         cout<<str[i];
     }
     cout<<endl;
     str="从前的   锁 也好看  钥匙精美有样子  ";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(200);
         cout<<str[i];
     }
     cout<<endl;
     str="你锁了    人家就懂了 ";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(200);
         cout<<str[i];
     }
     cout<<endl;
     str="从前的  日色变得慢  车 马 邮件都慢 ";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(200);
         cout<<str[i];
     }
     cout<<endl;
     str="一生只够   爱一个人   ";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(200);
         cout<<str[i];
     }
     cout<<endl;
     str="从前的 锁  也好看  钥匙精美有样子";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(200);
         cout<<str[i];
     }
     cout<<endl;
     str="你锁了   人家就懂了   ";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(200);
         cout<<str[i];
     }
     cout<<endl;
     str="你锁了   人家就懂了   ";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(200);
         cout<<str[i];
     }
     cout<<endl;
     str="曲    终";
     for (int i = 0; i < str.length(); ++i)
     {
         Sleep(800);
         cout<<str[i];
     }
     cout<<endl;
     return 0;
 }

搜索更多相关主题的帖子: str int for Sleep cout 
2017-10-08 13:19
dongcheng062
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2017-10-8
收藏
得分:0 
holla
2017-10-08 13:20
dongcheng062
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2017-10-8
收藏
得分:0 
哈哈   
随便乱发都可以
2017-10-08 13:24
阳光宝宝
Rank: 1
等 级:新手上路
威 望:1
帖 子:12
专家分:0
注 册:2006-6-3
收藏
得分:0 
for (int i = 0; i < str.length(); ++i)
     {
         Sleep(110);
         cout<<str[i];
     }
cout<<endl;

这几句可以放入一个子函数啊

http://abc.
2022-04-14 15:13
快速回复:《从前慢》歌词输出在这里(延时输出)
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021064 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved