SHOW:
|
|
- or go back to the newest paste.
| 1 | #include <iostream> | |
| 2 | #include <unistd.h> | |
| 3 | ||
| 4 | const int SECOND = 1000000; //one second = 1x10^6 microseconds | |
| 5 | using namespace std; | |
| 6 | ||
| 7 | ||
| 8 | int main() | |
| 9 | {
| |
| 10 | ||
| 11 | for (int i = 0; i <= 10; i++) | |
| 12 | {
| |
| 13 | cout << "."; | |
| 14 | cout.flush (); | |
| 15 | usleep (0.5 * SECOND); | |
| 16 | } | |
| 17 | ||
| 18 | cout << endl; | |
| 19 | return 0; | |
| 20 | } |