Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream.h>
- #include <stdlib.h>
- #include <dos.h>
- #include <conio.h>
- void main()
- {
- clrscr();
- struct time t;
- char hr[5], min[5], sec[5];
- while(1)
- {
- gettime(&t);
- clrscr();
- if(kbhit())
- break;
- gotoxy(10, 10);
- itoa(t.ti_hour, hr, 10);
- itoa(t.ti_min, min, 10);
- itoa(t.ti_sec, sec, 10);
- cout<<hr<<":"<<min<<":"<<sec;
- sleep(1);
- }
- }
Add Comment
Please, Sign In to add comment