Ads

DUSSEHRA WISHES PROGRAMMING IN C LANGUAGE


 HAPPY DUSSEHRA PROGRAMING IN C

//___________ WELCOME ALL OF YOU ON ROHIT TECH STUDY CHANNEL _______________//

//_________________ C++ PROGRAM TO WISH HAPPY DUSSEHRA ____________________//


#include<graphics.h>

#include<conio.h>

#include<stdio.h>

#include<stdlib.h>

#include<dos.h>

#include<math.h>

void main()

{

int i=0,gd=0, gm;

int j,kk;

int color;

int x,y;

initgraph(&gd,&gm,"C:\\TC\\BGI");


setcolor(WHITE);

line(0, 400, 640, 400);

rectangle(300, 330, 340, 400);

rectangle(310, 320, 330,330);

setcolor(4);

line(319, 280, 319, 398);

line(320, 280, 320, 398);

rectangle(320, 280, 330, 300);

outtextxy(340, 280, "PRESS ANY KEY TO IGNITE THE ROCKET");

getch();

for(j=400; j<640; j++)

{

cleardevice();

setcolor(WHITE);

line(0, j, 640, j);

rectangle(300, j-70, 340, j);

rectangle(310, j-80, 330, j-70);

setcolor(RED);

line(319, 280, 319, 400);

line(320, 280, 320, 400);

rectangle(320, 280, 330, 300);

setcolor(YELLOW);

circle(325, 300, 2);

delay(5);

}

for(i=400; i>340; i--)

{

cleardevice();

setcolor(RED);

line(319, i, 319, i-120);

line(320, i, 320, i-120);

rectangle(320, i-120, 330,i-100);

setcolor(YELLOW);

circle(325, i-100, 2);

delay(25);

}

cleardevice();

kk=0;

for(j=100; j<350; j++)

{

if (j%20==0)

{

setcolor(kk);

kk=kk+3;

delay(50);

}

ellipse(320, 30, 0, 360, j+100,j+0);

}

for(j=100; j<350; j++)

{

if(j%20==0)

{

setcolor(BLACK);

delay(2);

}

ellipse(320,30,0,360,j+100,j+0);

}

cleardevice();

i=0;

while(!kbhit())

{

color=rand()%15+1;

settextstyle(2,0,6);

setcolor(color+3);

outtextxy(40,(getmaxy()/2)-100,"MAY THE DEMON IN YOU ALWAYS GET DEFEATED");

outtextxy(40,(getmaxy()/2)-80,"AND THE ANGLE ALWAYS CONTROLS YOUR THOUGHTS.");

settextstyle(3,HORIZ_DIR,5);

setcolor(color+1);

settextstyle(3,0,7);

outtextxy(30,(getmaxy()/5)-50,"HAPPY DUSSEHRA!");

x=rand()%1366;

y=rand()%768;

for(i=768;i!=y;i--)

{

if(i%50==0)

delay(1);

putpixel(x,i,14);

}

for(i=768;i!=y;i--)

{

if(i%70==0)

delay(1);

putpixel(x,i,0);

}

for(j=0;j!=100;j+=5)

{

for(i=0;i!=360;i+=15)

{

setcolor(color);

line(x,y,x+j*cos(3.14/180*i),y+j*sin(i*3.14/180));

}

}

setcolor(0);

for(j=0;j!=100;j++)

{

for(i=0;i!=360;i+=15)

line(x,y,x+j*cos(3.14/180*i),y+j*sin(i*3.14/180));

}

}

cleardevice();

getch();

}

Post a Comment

0 Comments