Guest User

Untitled

a guest
May 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <time.h>
  3.  
  4. void wait ( int seconds )
  5. {
  6.   clock_t endwait;
  7.   endwait = clock () + seconds * CLOCKS_PER_SEC ;
  8.   while (clock() < endwait) {}
  9. }
  10.  
  11. int main ()
  12. {
  13.   int n;
  14.   printf ("Starting countdown...\n");
  15.   for (n=60; n>0; n--)
  16.     {
  17.       printf ("%d\n",n);
  18.       wait (1);
  19.     }
  20.   printf ("FIRE!!!\n");
  21.   return 0;
  22. }
Add Comment
Please, Sign In to add comment