Thursday, September 22, 2011

A Small program To Include Your own Header File in 'C' (DIGITAL CLOCK)

................THIS IS FIRST FILE OF THE APPLICATION.............
" DIGITALCLOCK.c "

#include"stdio.h"
#include"conio.h"
#include "c:\digit.h"
#include"dos.h"
void main()
{
struct time t;
int s,m,h,d,r,i,x,c;
clrscr();
printf("\t\t\t PROJECT : DIGITAL CLOCK ");
printf("\n\nTHE PROJECT IS MADE BY : MANISH KUMAR UPADHYAY ");
printf("\n\nSTUDENT OF MCA(VTU) III SEMESTER \n\nFROM : DAYANANDA SAGAR COLLEGE OF ENGINEERING (BANGALORE)");
printf("\n\nREG NUMBER : 1DS07MCA24");
printf("\n\npress any key.....");
getche();
gettime(&t);
s=t.ti_sec;
m=t.ti_min;
h=t.ti_hour;
c=h;
//clrscr();
textcolor(WHITE);
for(; ;)
{
clrscr();
if(s>59)
{
s=0;
m++;
}
if(m>59)
{
m=0;
h++;
}
x=h-12;
if(h>12)
h=x;
d=s/10;
r=s%10;
getdig(50,10,50,20,d);
getdig(56,10,56,20,r);
d=m/10;
r=m%10;
getdig(34,10,34,20,d);
getdig(40,10,40,20,r);
d=h/10;
r=h%10;
getdig(18,10,18,20,d);
getdig(24,10,24,20,r);
ap(63,10,63,20,c);
delay(500);
dot(46,10,46,20);
dot(29,10,29,20);
delay(500);
s++;
window(20,10,67,20);
clrscr();
}
}

No comments:

Post a Comment