#include<iostream.h>
#include<iostream>
#include<iomanip.h>
#include<windows.h>
void main()
{
int a,b,c,h,m,s,l=44;
cout<<setw(l);
cout<<"DIGITAL CLOCK"<<endl;
cout<<"\n";
cout<<"Enter time in hours = ";
cin>>a;
cout<<"Enter time in minutes= ";
cin>>b;
cout<<"Enter time in seconds= ";
cin>>c;
start:
for(h=a;h<24;h++)
{
for(m=b;m<60;m++)
{
for(s=c;s<60;s++)
{
Sleep(1000);
system("CLS");
cout<<h<<":"<<m<<":"<<s<<endl;
}
c=0;
}
b=0;
}
a=0;
goto start;
}
sohaib paracha 0 Newbie Poster
Eagletalon 34 Junior Poster in Training
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.