⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 analog_calender.cpp

📁 a simple c program for analog calender
💻 CPP
字号:
#include<stdio.h>
#include<math.h>
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<stdlib.h>
#include<dos.h>
#include<string.h>
//CLOCK CLASS
class clock
{
int h,m,s,thetamin,thetasec;
struct  time t;
public:
void time();
};
void clock::time()
{
int x=540,y=280,r=200,i;
char n[12][3]={"3","2","1","12","11","10","9","8","7","6","5","4"};
struct REGPACK reg;

setcolor(15);
circle(x,y,88);
circle(x,y,89);
setcolor(6);
settextstyle(5,0,1);
for(i=0;i<12;i++)
{
if(i!=3)
outtextxy(x+(r-132)*cos(M_PI/6*i)-8,y-(r-132)*sin(M_PI/6*i)-16,n[i]);
else
outtextxy(x+(r-132)*cos(M_PI/6*i)-10,y-(r-132)*sin(M_PI/6*i)-16,n[i]);
}
gettime(&t);

printf("
























								
");
printf("%2d:%02d:%02d",t.ti_hour, t.ti_min,t.ti_sec);

reg.r_ax=3;
intr(0x33,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -