/*
 * Programa: simcron.c
 * Versao: 2.0
 * Autor: melk0r (Thiago Alexandre)
 * Data: 05/04/06
 * Local: GYN (Goiania) - G0
 *
 */

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

#define clear system("CLS")
#define msg "          ============ (SIMCRON <--> Simulador de cronometro) =========="
#define aut "\n                        .**o._.o**. By melk0r .**o._.o**."

int main(void)
{
  /* Declarando as variáveis */  
  int hora,min,seg; 
  int i;
  int u = 0;
  /* Inicializando variáveis */
  hora = 0, min = 0, seg = 0; 

  clear;
  puts(msg);
  puts(aut);
  Sleep(2000);
  clear;     

  while (hora < 24)
  { 
    while (min < 60)
    {           
      while (seg < 60)
      {       
        printf("\n%38.2d:%.2d:%.2d",hora,min,seg);             	
        Sleep(1000);
        seg = seg + 1;           
        system("CLS");
      }
      seg = 0; /* Resetando segundo */
      min = min + 1; /* Incrementando minuto */
    }
    min = 0; 
    hora = hora + 1; /* Incrementando hora */
    
    /* Reseta hora para que o loop seja continuo */
    if (hora > 23)
    {
      hora = 0; 
    }         
  } 
  return(0);
}
