VC怎么让控制台打印Ajax的功能:“.”到“.”到“.”循环

VC如何让控制台打印Ajax的功能:“.”到“..”到“...”循环
如题。

------解决方案--------------------
C/C++ code
#include "stdafx.h"
#include <iostream>
#include <Windows.h>

using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{
    int i=1;
    while(true)
    {
        system("cls");
        switch(i%3)
        {
        case 0:
            {
                cout << "...";
                break;
            }
        case 1:
            {
                cout << ".";
                break;
            }
        case 2:
            {
                cout << "..";
                break;
            }
        }
        i++;
        Sleep(1000);
    }
    return 0;
}