赞
踩
- #include <stdio.h>
- #include<unistd.h>
- int main()
- {
- int i=0;
- char bar[101];
- const char* lable="|/-\\";//打印旋转的图标
- while(i<=100)
- {
- bar[i]='\0';
- printf("[%-100s] [%c] [%d/%]\r",bar,lable[i%4],i);
- fflush(stdout);
- bar[i]='#';
- i++;
- usleep(10000);
- }
- printf("/n");
- return 0;
- }
![](https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。