64,636
社区成员
发帖
与我相关
我的任务
分享
#include "stdafx.h"
#include "Windows.h"
int _tmain(int argc, _TCHAR* argv[])
{
printf("begin\n");
int nProgress=0;
bool bIns = true;
while(1)
{
if (bIns)
{
printf("#");
nProgress++;
}
if (!bIns)
{
printf("\b \b");
nProgress--;
}
if (nProgress >= 10)
{
bIns = false;
}
else if (nProgress <=0 )
{
bIns = true;
}
Sleep(500);
}
getchar();
return 0;
}