赞
踩
有点无聊的小程序, 但是在以后算大网络时, 可以加进来观看进度。
- #include<stdio.h>
-
- #define MAXSTEP 1000
-
- main(void)
- {
- int i, j, progess, prg_temp;
- progess = prg_temp = 0;
- for( i = 1; i <= MAXSTEP; ++i )
- {
- progess = (int)((double)i / MAXSTEP * 100);
- if( prg_temp != progess )
- {
- printf(">");
- prg_temp = progess;
- }
- printf("%d%%", progess);
-
- for( j = 1; j <= 10000000; j++ );
-
- if( progess < 10 && 0 < progess )
- printf("\b\b");
- else
- printf("\b\b\b");
- }
- printf("\a");
- return 0;
- }
![](https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。