Digital And Analog clock

//By MOHSIN ABBAS
//CIIT-wah cantt
//BS(TN)-058
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include<iostream.h>
#include <conio.h>
#include<dos.h>
#include<process.h>
void clock();
void main(void)
{
clrscr();
float sangle=450,eangle=451,shr,ehr,smin,emin;
int hr,min,sec=0,tempo;
int gdriver=DETECT,gmode;
initgraph(&gdriver,&gmode,“c:/tc/bgi”);
setbkcolor(11);
cout<<“Seting up clock…
“;
cout<<“Enter hour:”;
cin>>hr;
cout<<“Enter min:”;
cin>>min;
cout<<“Enter tempo for clock in ms
(1s=1000ms):”;
cin>>tempo;
shr=420-(hr-1)*30;
ehr=shr+1;
smin=420-(min-6)*6-6;
emin=smin+1;
while(!kbhit())
{
delay(tempo);
clearviewport();
setcolor(9);
rectangle(280,264,358,297);
gotoxy(37,18);
cout<<hr<<”:”<<min<<":"<<sec;
gotoxy(32,20);
cout<<“MOHSIN_PRIETY_ABBAS”<<endl;
gotoxy(35,21);
cout<<“BS(TN-2)-058”<<endl;
setcolor(2);
pieslice(319,237,sangle,eangle,200);
setcolor(5);
pieslice(319,237,smin,emin,185);
setcolor(6);
pieslice(319,237,shr,ehr,165);
if(sec==60)
{ sec=0;
min++;
sangle=450;
eangle=451;
smin-=6;
emin-=6;
}
if(min==60)
{
smin=450;
emin=smin+1;
min=0;
shr-=30;
ehr-=30;
hr++;
}
if(hr==12&&min==60)
{
smin=450-6;
emin=smin+1;
shr=450-30;
ehr=450-30;
hr++;
}
else if(hr==13)
hr=1;
clock();
sangle=sangle-6;
eangle-=6;
sec++;
}
getch();
}
void clock()
{
int i,j,sangle=0,eangle=1,r=200;
setlinestyle(SOLID_LINE,1,THICK_WIDTH);
for(i=0;i<=360;i++)
{
arc(319,237,sangle,eangle,195);
sangle=sangle+6;
eangle=eangle+6;
}
sangle=420;
eangle=421;
for(i=0;i<11;i++)
{
arc(319,237,sangle,eangle,195);
arc(319,237,sangle,eangle,194);
arc(319,237,sangle,eangle,193);
arc(319,237,sangle,eangle,192);
arc(319,237,sangle,eangle,191);
arc(319,237,sangle,eangle,190);
arc(319,237,sangle,eangle,189);
arc(319,237,sangle,eangle,188);
arc(319,237,sangle,eangle,187);
sangle-=30;
eangle-=30;
}
fillellipse(319,50,5,10);
fillellipse(319,424,5,10);
fillellipse(132,237,10,5);
fillellipse(506,237,10,5);
for(i=0;i<20;i++)
{
circle(319,237,r);
r++;
setcolor(i+5);
}
fillellipse(319,237,5,5);
}