用C实现百分比进度条指示器

1 #include <stdio.h>
2 #include <stdlib.h>
3
4 int main()
5 {
6 int i, lotsa = 100000;
7 for (i = 0; i < lotsa; i++) {
8 printf("\r%3d%%", (int )(100L * i / lotsa));
9 fflush(stdout);
10 }
11 printf("\ndone.\n");
12 return 0;
13 }
原文地址:https://www.cnblogs.com/shenfei2031/p/2017383.html