Digital Clock In C++ Free Download 

Coding:

#include<conio.h>
#include<dos.h>
#include<iostream.h>
#include<stdio.h>
void main()
{
clrscr();
int h,m,s,hi,mi,a;
b:
cout<<"\n\n\t\tEnter the Time where you wants to start the watch"<<endl;
cout<<"\n\t\tEnter Hours = ";
cin>>hi;
cout<<"\n\t\tEnter Mints = ";
cin>>mi;

for(h=hi;h<24;)
{
for(m=mi;m<60;)
{
for(s=0;s<60;s++)
{
clrscr();
cout<<"\n\n\n\n--------------------------------------------------------------------------------"<<endl;
cout<<"\t\t\t\t"<<h<<" : "<<m<<" : "<<s;
cout<<"\n\n--------------------------------------------------------------------------------\n\n"<<endl;
cout<<"\n\n\t\t\t\tWatch on Working"<<endl;
cout<<"\n\n\t\t\t\tPress Any key For Menu"<<endl;
delay(1050);

if (kbhit())
{

goto r;
}
}
m++;
}
h++;
}
hi=0;
mi=0;

r:
clrscr();
cout<<"\n\n\n\n\t\t*Enter 1 For Reset Wathch*"<<endl;
cout<<"\n\t\t*Enter 2 For Close Wathch*"<<endl;
cout<<"\n\t\tPlease Select Any Number = ";
cin>>a;
if (a==1)
{
clrscr();
goto b;
}
else
{
}

getch();
}

--------------------------------------------------------------------------------------------------------------------------

Download:




Share To:

Adeel Rasheed

Full Stack Website Developer

Post A Comment:

0 comments so far,add yours