Author Topic: [C++] Simple Clock Countdown  (Read 481 times)

Offline BlizzIce

  • Ice.dll Loaded.
  • Retired Staff
  • Full
  • ******
  • Posts: 165
  • Karma -7
  • Hacking is my life.
  • Location: USA!
    • View Profile
    • Freedom Hackers
[C++] Simple Clock Countdown
« on: June 18, 2011, 01:06:56 am »
Code: [Select]
// Simple C++ Clock Countdown.
// Coded by: BlizzIce
// Complied with Dev C++ with 0 Errors.


#include <stdio.h>
#include <time.h>

void wait ( int seconds )
{
  clock_t endwait;
  endwait = clock () + seconds * CLOCKS_PER_SEC ;
  while (clock() < endwait) {}
}

int main ()
{
  int n;
  printf ("Starting countdown...\n");
  for (n=10; n>0; n--)
  {
    printf ("%d\n",n);
    wait (1);
  }
  printf ("FIRE!!!\n");
  return 0;
}
« Last Edit: June 18, 2011, 01:11:14 am by BlizzIce »
Life isn't about finding yourself. Life is about creating yourself.

Freedom 2 Hack









Epic Hax.dll Version 1.00 By: BlizzIce for SC1 1.16.1 - [87.4%]

Share on Bluesky Share on Facebook