All pastes #390090 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-03-11 03:51 UTC
rendered paste body
#ifdef __GNUC__
#include <unistd.h>
#endif

#ifdef _WIN32
#include <cstdlib>
#endif

#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
  cout << "CTRL-C to exit...\n";

  for (int count = 10; count > 0; count--) {
	  
   cout << setw(2) << count;
	cout.flush();
    

    #ifdef __GNUC__
    sleep(1);
    #endif

    #ifdef _WIN32
    _sleep(1000);
    #endif
	cout << "\r";
  }
  return 0;
}