#include<stdio.h>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
void main()
{
clrscr();
while(!kbhit())
{
struct time t;
gettime(&t);
textcolor(random(15)) ;
gotoxy(23,3);
printf("%d:%d:%0d",t.ti_hour,t.ti_min,t.ti_sec);
sleep(1);
clrscr();
}
getch();
}
murtazamzk 26
Light Poster
Narue
commented:
Post a code snippet if you want to show off your crappy code. The forum is for people who want help with problems. -5
Jason Giggs
commented:
Nice said narue +0
Recommended Answers
Jump to PostThis program uses many outdated practices (void main, clrscr, kbhit) and should not be used as an example by anyone.
All 3 Replies
WaltP 2,905
Posting Sage w/ dash of thyme Team Colleague
murtazamzk 26
Light Poster
death_oclock 103
Posting Whiz
WaltP
commented:
So true... +15
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.