#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();

}
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

All 3 Replies

Congratulations.

This program uses many outdated practices (void main, clrscr, kbhit) and should not be used as an example by anyone.

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.