<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>digital clock | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/digital-clock/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Wed, 10 Mar 2010 14:52:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>C graphics program for analog clock</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-graphics-program-for-analog-clock/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-graphics-program-for-analog-clock/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 02 Oct 2009 12:51:49 +0000</pubDate>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Source Codes]]></category>
		<category><![CDATA[c graphics]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[analog clock]]></category>
		<category><![CDATA[clock in c]]></category>
		<category><![CDATA[digital clock]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=843</guid>

					<description><![CDATA[<p>Time_Dig[0]=hour/10+48;<br />
      Time_Dig[1]=hour%10+48;<br />
      Time_Dig[2]=':';<br />
      Time_Dig[3]=min/10+48;<br />
      Time_Dig[4]=min%10+48;<br />
      Time_Dig[5]=':';<br />
      Time_Dig[6]=sec/10+48;</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-graphics-program-for-analog-clock/">C graphics program for analog clock</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c">
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<math.h>

#define arg_sec M_PI/30
#define arg_hour M_PI/6
#define arg_min M_PI/360
void main()
{
  int gd=DETECT,gm,sec=0,hour,min,x1=0,y1=0,x2=0,y2=0,x3=0,y3=0;
  char *k[12]={"1","2","3","4","5","6","7","8","9","10","11","12"};
  struct time t;
  initgraph(&gd,&gm,"");
  setcolor(YELLOW);
  circle(300,200,200);
  circle(300,200,180);
  setfillstyle(1,RED);
  floodfill(300,390,YELLOW);
  settextstyle(DEFAULT_FONT,0,2);
//----------------------Constants----------------------//

  int a,b;
  for(int i=1;i<13;i++)
    {
	a=160*cos(arg_hour*i-M_PI_2);
	b=160*sin(arg_hour*i-M_PI_2);
	outtextxy(a+300,b+200,k[i-1]);
    }

//----------------------Constants----------------------//
/*****************************************************
		 1-Good
		 2-Small
		 3-Watse
		 4-caligraphy
		 5-cursive
		 6-good
		 7-excellent
		 8-Good
		 9-Big
		 10-Double
 ****************************************************/
 int dig_sec;
 char Time_Dig[14];
  while(!kbhit())
   {
       settextstyle(7,0,4);
      outtextxy(264,100,"Satya");
      settextstyle(7,0,1);
      outtextxy(278,280,"Quartz");
      setcolor(BLACK);
      line(300,200,x1+300,y1+200);
      line(300,200,x2+300,y2+200);
      line(300,200,x3+300,y3+200);
      gettime(&#038;t);
      if(sec!=t.ti_sec)
	{
	   sound(5000);
	   delay(1);
	   nosound();
	}
      hour=t.ti_hour;
      sec=t.ti_sec;
      min=t.ti_min;
      Time_Dig[0]=hour/10+48;
      Time_Dig[1]=hour%10+48;
      Time_Dig[2]=':';
      Time_Dig[3]=min/10+48;
      Time_Dig[4]=min%10+48;
      Time_Dig[5]=':';
      Time_Dig[6]=sec/10+48;
      Time_Dig[7]=sec%10+48;
      Time_Dig[8]='\0';
      outtextxy(270,250,"ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ");
      x1=150*cos(arg_sec*sec-M_PI_2)*0.98;
      y1=150*sin(arg_sec*sec-M_PI_2)*0.98;
      x2=150*cos(arg_sec*min-M_PI_2)*0.9;
      y2=150*sin(arg_sec*min-M_PI_2)*0.9;
      if(hour>12) hour-=12;
      x3=150*cos(arg_hour*hour-M_PI_2+arg_min*min)*0.6;
      y3=150*sin(arg_hour*hour-M_PI_2+arg_min*min)*0.6;
      setcolor(YELLOW);
      line(300,200,x1+300,y1+200);
      setcolor(CYAN);
      line(300,200,x2+300,y2+200);
      setcolor(WHITE);
      line(300,200,x3+300,y3+200);
      setcolor(YELLOW);
      outtextxy(270,250,Time_Dig);
      delay(50);

   }

  getch();
  closegraph();
  restorecrtmode();
}
</pre>
<p><a href="https://studentprojects.in/wp-content/uploads/2009/10/Clock.zip"><br />
Click here</a> to download the source code.</p><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-graphics-program-for-analog-clock/">C graphics program for analog clock</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-graphics-program-for-analog-clock/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
	</channel>
</rss>
