Find   


An Affiliate of AIHorizon




This snippet submitted by richmond caesar on 2005-04-18. It has been viewed 23217 times.
Rating of 3.1707 with 246 votes

a simple clock

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

int main()
{
struct tm *tmp;
time_t s;

for(;;)
{
s = time(NULL);
tmp = localtime(&t);

	printf("%d:%0d:%d\n",tmp->tm_hour,tmp->tm_min,tmp->tm_sec);
    
	Sleep(1000);
	
   	system ("cls");

}  

	
return 0;
}






More snippets


Add a snippet!




-----
Interested in advertising with us?
Please read our privacy policy.
Copyright © 1997-2005 Cprogramming.com. All rights reserved.