Program:-
#include<iostream.h>
#include<conio.h>
#include<time.h>
#include<dos.h>
#include<stdio.h>
#include<stdlib.h>
#include<graphics.h>
void village();
void trees();
void mountains();
void sun();
void moon();
void design();
int day,x,y;
void main()
{
day=0;
int gdriver=DETECT,gmode;
initgraph(&gdriver,&gmode,"c:\\tc\\bgi");
design();
for(int i=0;i<5;i++)
{
cleardevice();
design();
switch(i)
{
case 0: outtextxy(getmaxx()-100,50,"4 MARCH");break;
case 1: outtextxy(getmaxx()-100,50,"5 MARCH");break;
case 2: outtextxy(getmaxx()-100,50,"5 MARCH");break;
case 3:
case 4: outtextxy(getmaxx()-100,50,"6 MARCH");
outtextxy(50,50,"HAPI BDAY");break;
}
sleep(3);
}
getch();
}
void design()
{
village();
trees();
mountains();
if(day==1)
{
sun();
day=0;
}
else
{
moon();
day=1;
}
}
void village()
{
int tr[6]={100,350,200,350,150,300},tr1[6]={75,350,125,300,175,350};
setcolor(WHITE);
rectangle(10,10,getmaxx()-10,getmaxy()-10);
if(day==1)
setfillstyle(2,1);
else
setfillstyle(2,BLUE);
fillpoly(4,tr1);
if(day==1)
setfillstyle(2,6);
else
setfillstyle(2,BLUE);
fillpoly(3,tr);
int sq[]={115,350,115,400,145,400,145,380,155,380,155,400,185,400,185,350,115,350};
int sq1[]={90,350,90,400,120,400,120,380,130,380,130,400,160,400,160,350,90,350};
if(day==1)
setfillstyle(0,3);
else
setfillstyle(0,BLUE);
fillpoly(8,sq1);
line(220,330,220,400);
if(day==0)
setfillstyle(9,WHITE);
else
setfillstyle(9,0);
sector(220,320,0,360,10,20);
if(day==1)
setfillstyle(9,3);
else
setfillstyle(9,BLUE);
fillpoly(8,sq);
}
void trees()
{
if(day==1)
{
setcolor(BROWN);
setfillstyle(1,BROWN);
}
else
{
setcolor(BLUE);
setfillstyle(1,BLUE);
}
int tree[]={50,330,50,400,60,400,60,330};
fillpoly(4,tree);
if(day==1)
{
setcolor(GREEN);
setfillstyle(9,GREEN);
}
else
{
setcolor(BLUE);
setfillstyle(9,BLUE);
}
sector(55,330,0,360,20,30);
}
void mountains()
{
if(day==1)
{
setcolor(BROWN);
setfillstyle(1,BROWN);
}
else
{
setcolor(BLUE);
setfillstyle(1,BLUE);
}
int mou[]={250,300,300,250,350,300,400,250,450,300,500,250,550,300};
fillpoly(7,mou);
}
void sun()
{
setcolor(4);
setfillstyle(1,4);
sector(200,200,0,360,30,30);
}
void moon()
{
setcolor(WHITE);
setfillstyle(1,WHITE);
sector(200,200,0,360,30,30);
setfillstyle(1,0);
setcolor(0);
sector(180,180,0,360,30,30);
}
#include<iostream.h>
#include<conio.h>
#include<time.h>
#include<dos.h>
#include<stdio.h>
#include<stdlib.h>
#include<graphics.h>
void village();
void trees();
void mountains();
void sun();
void moon();
void design();
int day,x,y;
void main()
{
day=0;
int gdriver=DETECT,gmode;
initgraph(&gdriver,&gmode,"c:\\tc\\bgi");
design();
for(int i=0;i<5;i++)
{
cleardevice();
design();
switch(i)
{
case 0: outtextxy(getmaxx()-100,50,"4 MARCH");break;
case 1: outtextxy(getmaxx()-100,50,"5 MARCH");break;
case 2: outtextxy(getmaxx()-100,50,"5 MARCH");break;
case 3:
case 4: outtextxy(getmaxx()-100,50,"6 MARCH");
outtextxy(50,50,"HAPI BDAY");break;
}
sleep(3);
}
getch();
}
void design()
{
village();
trees();
mountains();
if(day==1)
{
sun();
day=0;
}
else
{
moon();
day=1;
}
}
void village()
{
int tr[6]={100,350,200,350,150,300},tr1[6]={75,350,125,300,175,350};
setcolor(WHITE);
rectangle(10,10,getmaxx()-10,getmaxy()-10);
if(day==1)
setfillstyle(2,1);
else
setfillstyle(2,BLUE);
fillpoly(4,tr1);
if(day==1)
setfillstyle(2,6);
else
setfillstyle(2,BLUE);
fillpoly(3,tr);
int sq[]={115,350,115,400,145,400,145,380,155,380,155,400,185,400,185,350,115,350};
int sq1[]={90,350,90,400,120,400,120,380,130,380,130,400,160,400,160,350,90,350};
if(day==1)
setfillstyle(0,3);
else
setfillstyle(0,BLUE);
fillpoly(8,sq1);
line(220,330,220,400);
if(day==0)
setfillstyle(9,WHITE);
else
setfillstyle(9,0);
sector(220,320,0,360,10,20);
if(day==1)
setfillstyle(9,3);
else
setfillstyle(9,BLUE);
fillpoly(8,sq);
}
void trees()
{
if(day==1)
{
setcolor(BROWN);
setfillstyle(1,BROWN);
}
else
{
setcolor(BLUE);
setfillstyle(1,BLUE);
}
int tree[]={50,330,50,400,60,400,60,330};
fillpoly(4,tree);
if(day==1)
{
setcolor(GREEN);
setfillstyle(9,GREEN);
}
else
{
setcolor(BLUE);
setfillstyle(9,BLUE);
}
sector(55,330,0,360,20,30);
}
void mountains()
{
if(day==1)
{
setcolor(BROWN);
setfillstyle(1,BROWN);
}
else
{
setcolor(BLUE);
setfillstyle(1,BLUE);
}
int mou[]={250,300,300,250,350,300,400,250,450,300,500,250,550,300};
fillpoly(7,mou);
}
void sun()
{
setcolor(4);
setfillstyle(1,4);
sector(200,200,0,360,30,30);
}
void moon()
{
setcolor(WHITE);
setfillstyle(1,WHITE);
sector(200,200,0,360,30,30);
setfillstyle(1,0);
setcolor(0);
sector(180,180,0,360,30,30);
}
Great content thanks for sharing this informative
ReplyDeleteandroid apps apkzm
android apps apkzm
android apps apkzm
android apps apkzm
android apps apkzm
android apps apkzm
android apps apkzm
android apps apkzm
Automated Forex Trading : exness login Is An Automated Forex Investing Software. It Is An Algorithmic Trading Software That Provides Automated Forex Trading Signals.
ReplyDeleteAutomated Forex Trading : exness login Is An Automated Forex Investing Software. It Is An Algorithmic Trading Software That Provides Automated Forex Trading Signals.
Nice Article with full of information,I am very impressed with your work because your work provide me a great knowledgeCan you please do More articles like this blog. Random Password Generator QR Code Generator
ReplyDeleteff Redeem Code
Nice Article with full of information,Thanks for sharing with us.if you face any kind of trouble using QuickBooks, contact immediately. Can you please do more articles like this blog. Random Password Generator
ReplyDeleteQR Code Generator
ff Redeem Code