TavarClock.cpp
TavarClock.cpp
h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
#include<stdlib.h>
void main() {
int gd = DETECT, gm;
drawCircle(300,130,100);
drawCircle(300,130,95);
drawCircle(300,130,2);
drawline(250,218,250,410);
drawline(350,218,350,410);
drawline(300,230,300,350);
drawCircle(300,360,10);
drawline(220,410,380,410);
drawline(220,430,380,430);
drawline(220,410,220,430);
drawline(380,410,380,430);
drawline(305,130,360,130);
drawline(300,125,300,95);
outtextxy(300,200,"6");
outtextxy(370,130,"3");
outtextxy(230,130,"9");
outtextxy(298,50,"12");
// Fill colors into shapes
setfillstyle(SOLID_FILL, BROWN);
floodfill(397,130, WHITE); // Circle
setfillstyle(SOLID_FILL,RED);
floodfill(305,340,WHITE);
setfillstyle(SOLID_FILL, CYAN);
floodfill(270,413,WHITE);
setfillstyle(SOLID_FILL, 13);
floodfill(380,130,WHITE);
getch();
closegraph();
}
xinc = dx / steps;
yinc = dy / steps;
x = x1;
y = y1;
while (x < y) {
x++;
if (p < 0) {
p = p + 2 * x + 1;
} else {
y--;
p = p + 2 * x - 2 * y + 1;
}