代码:
/*
* Copyright (c) 2014, 烟台大学计算机学院
* All rights reserved.
* 文件名称:test.cpp
* 作 者:阿里木·阿布都热合曼
* 完成日期:2014年 12 月 15 日
* 版 本 号:v1.0
*
* 问题描述:
* 输入描述:
* 程序输出:
*/
#include <iostream>
#include <windows.h> //使用Sleep()函数必须包含windows.h,这种方法只适用于windows
using namespace std;
int main( )
{
int i;
for(i=1; i<=10; i++)
{
Sleep(200); //等待200毫秒
cout<<"■";
}
cout<<endl;
return 0;
}
运行结果: