谁用谁知道。。
#include<bits/stdc++.h>
using namespace std;
const int mx = 20;
const double period = 10.0;
int main()
{
for (int i = 0;; i = (i + 1) % (2 * mx))
{
double starttime = clock();
while (clock() - starttime < period);
for (int j = 0; j < mx; ++j)
putchar('\b');
int j;
for (j = 0; j < (i <= mx ? i : (2 * mx) - i); ++j)
putchar('.');
for (; j < mx; ++j)
putchar(' ');
}
return 0;
}