Analog Clock in C Programming
Sebuah jam analog sederhana dengan menggunakan bahasa program C++.#include
#include
#include
#include
#include
#include
#include
void main()
{
struct time x;
int gdriver = DETECT, gmode, errorcode;
initgraph(&gdriver, &gmode, "");
setfillstyle(SOLID_FILL, RED);
fillellipse(680,480,680,480);
setfillstyle(SOLID_FILL, YELLOW);
fillellipse(680,480,600,480);
setfillstyle(SOLID_FILL, GREEN);
fillellipse(680,480,500,480);
setfillstyle(SOLID_FILL, BLACK);
fillellipse(680,480,400,480);
setcolor(BLUE);
settextstyle(TRIPLEX_FONT,0,3);
outtextxy(1,15," ANALOG CLOCK in C Programming");
setfillstyle (SOLID_FILL, LIGHTBLUE);
fillellipse (320, 240, 175, 175);
//inisialisasi variabel
int x1= getmaxx()/2, dx2, mx2, jx2;
int y1= getmaxy()/2, dy2, my2, jy2;
int dr= 165;
int mr= 130;
int jr= 90;
float dsudut;
float msudut;
float jsudut;
int px=284, py=301, pp=70, pl=21;
int tombol= 0;
for(;tombol!=27;) //cek tombol
{
if(kbhit())
{
tombol=getch();
if(tombol==0) tombol=getch();
}
//ambil jam komputer
gettime(&x);
gotoxy(37,20);
printf("%2d:%02d:%02d",
x.ti_hour, x.ti_min, x.ti_sec);
........
Download Link
http://www.ziddu.com/download/8501151/ANALOG3.rar.html
Others
http://www.ziddu.com/download/8501249/TIME.rar.html
:e:
BalasHapusThanks brur..!
BalasHapusijin sedot ya bos..
:g: