Click & Register in this...
Click & Register in this..... enjoy earning easily..
Register in this...... earn easily $$$$$$$$$$$$ Earn upto Rs. 9,000 pm checking Emails. Join now! - sunny

Wednesday, July 28, 2010

headerfiles used for d below

stdio.h
conio.h
stdlib.h
graphics.h
dos.h
math.h

Tuesday, July 13, 2010

sankranthi wish in c graphics

//Author : srikanth Noundla
//Email ID : sicetece@gmail.com
//Web site : sicetece.blogspot.com


//Wishes u a Happy Sankranthi

#include
#include
#include
#include
main()
{
int gd,gm,i,j=0;
clrscr();
gd=DETECT;
initgraph(&gd,&gm,"c:\\tc\\bgi");
setbkcolor(RED);

do
{ j++;
for(i=500;i>0;i--)
{
outtextxy(i,200,"Happy Sankranthi");
cleardevice();
setcolor(YELLOW);
delay(5);
line(140,60+i,100,100+i); //line1
line(100,100+i,140,180+i); //line2
line(140,180+i,180,100+i); //line3
line(180,100+i,140,60+i); //line4
setlinestyle(DASHED_LINE,1,3);
line(140,180+i,140,300+i); //line5
setlinestyle(SOLID_LINE,1,1);
circle(95,100+i,6); //circle1
circle(186,100+i,6); //circle2
ellipse(140,99+i,180,360,39,16);
}
}
while(j<3);//iterations
settextstyle(GOTHIC_FONT,0,3);
outtextxy(330,180,"****************************");
outtextxy(330,200,"HAPPY SANKRANTHI");
outtextxy(330,218,"****************************");
getch();
setcolor(BLUE);
settextstyle(SANS_SERIF_FONT,0,2);
outtextxy(440,380,"Ur...");
outtextxy(440,400,"Srikanth Noundla");
getch();
closegraph();
return 0;
}

methematical fun in c graphics

//Author : Srikanth Noundla
//Email ID : sicetece@gmail.com
//Web Site : sicetece.blogspot.com

// humourous guyzz plzz rply ur feeling n snd different funny concepts
//Mathematical fun concept

#include
#include
#include
#include
#include

void main()
{
int gd,gm,i,j,m;
clrscr();
gd=DETECT;
initgraph(&gd,&gm,"c:\\tc\\bgi");
printf("\n\ne^x & c r talking together ----> \te^x+c");//TAKE1

/*for(m=0;m<10;m++)
{
sound(900%m+25);
delay(30);
}
nosound();
//delay(30); */
getch();
cleardevice();
outtextxy(200,70,"e^x+c"); //TAKE2
printf("\n\t\tc: Derivative coming it wil neutral me");
outtextxy(10,70,"derivate");
for(m=0;m<=10;m++)
{
sound(random(120)*m+20);
delay(20);
}
nosound();
getch();
//TAKE3
for(i=220;i<500;i++) //Running of c
{

outtextxy(10,70,"derivate");
outtextxy(200,70,"e^x");
outtextxy(i,70,"c");
delay(4);
cleardevice();


}
//take4
outtextxy(10,70,"derivate");
outtextxy(200,70,"e^x");
for(m=0;m<=12;m++)
{
sound(random(400)%45);
delay(20);
}
nosound();
getch();
outtextxy(240,70,": haha.....i'v no problem i'm e^x");
getch();
for(i=10;i<70;i++)
{
outtextxy(i,70,"derivate");
delay(15);
cleardevice();
outtextxy(i,70,"derivate");
outtextxy(200,70,"e^x");
}
//punch to the e^x
cleardevice();
outtextxy(i,70,"d/dy");
outtextxy(i,58,":haha....i'm d/dy not d/dx");
outtextxy(200,70,"e^x !");
for(m=0;m<=10;m++)
{
sound(400-m*12);
delay(30);
}
nosound();
getch();
//take5
//neutralises e^x zero
for(j=i;j<210;j++)
{
outtextxy(j,70,"d/dy");
delay(10);
cleardevice();
outtextxy(j,70,"d/dy");
outtextxy(200,70,"e^x");
}
for(m=0;m<=5;m++)
{
sound(220*m-23);
delay(3);
}
nosound();
cleardevice();
outtextxy(j,70,"0");
for(i=j;i<500;i++)
{
outtextxy(i,70,"d/dy");
delay(10);
cleardevice();
outtextxy(j,70,"0");
}
cleardevice();
settextjustify(CENTER_TEXT,CENTER_TEXT);
settextstyle(SANS_SERIF_FONT,0,3);
setcolor(YELLOW);
outtextxy(300,180,"concept");
setetxxy(300,220,"Chandra shekar");
for(i=0;i<70;i++)
{
delay(dl);
}
cleardevice();
outtextxy(300,180,"created by");
settextstyle(SANS_SERIF_FONT,0,5);
outtextxy(300,220,"Srikanth Noundla");

delay(1);
for(j=0;j<3;j++)
{
for(i=0;i<=10;i++)
{
sound(150+i*10);
delay(80);
}
nosound();
}
getch();
cleardevice();
}

love prog. in c graphics

//Author : Srikanth Noundla
//Email ID : sicetece@gmail.com
//Web Site : sicetece.blogspot.com


//do u love any1 just use dis 2 express ur feelings n help me in new concepts

//Displays as my heart is full of u

#include
#include
#include
#include
#include
heart();
arrow_after_hit(int);

//draws heart
heart()
{
setcolor(6);
setfillstyle(SOLID_FILL,6);
pieslice(450,100,0,360,40);
pieslice(520,100,0,360,40);
pieslice(493,208,55,131,100);
return 0;
}

//draws broken arrow after hit heart
arrow_after_hit(int x)
{
settextstyle(DEFAULT_FONT,0,1);
setcolor(YELLOW);
outtextxy(x+35,110,">>>-----");
setcolor(RED);
outtextxy(x+95,110,"-");
return 0;
}

void main()
{
int gd=DETECT,gm,x,y,i,d;
char name[20];
clrscr();
initgraph(&gd,&gm,"c:\\tc\\bgi");
//intialise

outtextxy(20,20,"Hi friend");
outtextxy(20,30,"pls Enrole ur name");
printf("\n\n\n\t\t");
fflush(stdin);
//reads user name
gets(name);
//changes background color
setbkcolor(8);
//sets color of font
setcolor(6);
//sets fill style
setfillstyle(SOLID_FILL,6);
//draws heart
pieslice(450,100,0,360,40);
pieslice(520,100,0,360,40);
pieslice(493,208,55,131,100);

//motion of arrow
for(x=0;x<385;x=x+2)
{

setcolor(YELLOW);
//draws arrow
outtextxy(x-7,110,">>>---------->");
delay(30);
cleardevice();
heart();

setcolor(YELLOW);
outtextxy(x-7,110,">>>---------->");
}

heart();
arrow_after_hit(x);

//blood drops
for(i=0;i<2;i++)
{
for(y=105;y<250;y++)
{
setfillstyle(SOLID_FILL,RED);
pieslice(x+105,y,0,360,4);
if(i>0 && y>120)
{
pieslice(x+90,y,0,360,2);
delay(10);
}
if(y>150)
{
pieslice(x+105,y-15,0,360,3);
delay(10);
pieslice(x+110,y-30,0,360,4);
delay(10);
pieslice(x+95,y-5,0,360,4);
}
delay(10);
cleardevice();
heart();
arrow_after_hit(x);

//sets delay time
for(d=0;d<5;d++)
{
delay(d);
}

} if(i>0)
{
//prints user name
settextstyle(GOTHIC_FONT,0,4);
outtextxy(x+80,y-30,name);
}
}

setcolor(YELLOW);
settextstyle(SANS_SERIF_FONT,0,4);
for(d=0;d<50;d++)
{
delay(d);
}
outtextxy(100,200,"Created by");
for(d=0;d<30;d++)
{
delay(d);
}
setcolor(13);
outtextxy(102,238,"Srikanth Noundla");
setcolor(YELLOW);
outtextxy(100,240,"Srikanth Noundla");
getch();
closegraph();
}

c graphics program for commonweakth games Delhi 2010

/Author : Srikanth Noundla
//Email ID : sicetece@gmail.com
//Web Site : sicetece.blogspot.com

/*An advertisment for Commonwealth Games Delhi 2010
Official sponserer: Hero Honda */


#include
#include
#include
#include
#include
#define PI 3.1415


heli_draw(int,int,int);


//Draws & moves wheel
void rotate_wheel(int xc,int yc,int t)
{
int x,y,i;
setcolor(random(16));
for(t=t;t<180;t=t+60)
{
x=30*cos(t*PI/180);
y=30*sin(t*PI/180);
line(xc+x,yc+y,xc-x,yc-y);
}
for(i=0;i<5;i++)
{
setcolor(random(16));
circle(xc,yc,10+i);
}
setcolor(8);
circle(xc,yc,30);
circle(xc,yc,32);
circle(xc,yc,34);
circle(xc,yc,35);
circle(xc,yc,36);
}

//Draws Ashoka wheel
void ashoka_wheel(int xc,int yc,int t)
{
int x1,y1,x2,y2,x3,y3;

setcolor(BLUE);
for(t=t;t<180;t=t+60)
{
x1=15*cos(t*PI/180);
y1=15*sin(t*PI/180);
x2=15*cos(500+t*PI/180);
y2=15*sin(500+t*PI/180);
x3=15*cos(2000+t*PI/180);
y3=15*sin(2000+t*PI/180);
line(xc+x1,yc+y1,xc-x1,yc-y1);
line(xc+x2,yc+y2,xc-x2,yc-y2);
line(xc+x3,yc+y3,xc-x3,yc-y3);

}
circle(xc,yc,15);
circle(xc,yc,16);
circle(xc,yc,17);
}

//Draws flag
void flag(int i)
{
setfillstyle(SOLID_FILL,BROWN);
bar(i,50,100,100);
setfillstyle(SOLID_FILL,WHITE);
bar(i,90,100,130);
setfillstyle(SOLID_FILL,GREEN);
bar(i,130,100,170);
}

//Draws helicopter at given location and direction
heli_draw ( int x, int y, int d )
{
int direction, i, j ;

setcolor(LIGHTBLUE);

sound(50);
delay(10);
nosound();
if ( d )
direction = -1 ;
else
direction = 1 ;

i = 3 ;
j = 8 ;

line ( x - j - 8, y - i - 2, x + j + 8, y - i - 2 ) ;
line ( x - j + 5, y - i - 1, x + j - 5, y - i - 1 ) ;
line ( x - j, y - i, x + j, y - i ) ;
for ( ; i > 0 ; i--, j += 2 )
{
putpixel ( x - ( direction * j ), y - i, 1 ) ;
line ( x + ( direction * j ), y - i, x + ( direction * ( j - 8 ) ), y - i ) ;
}

i = 0 ;
j -= 2 ;

line ( x - ( direction * j ), y - i, x - ( direction * ( j + 17 ) ), y - i ) ;
line ( x - ( direction * j ), y - i + 1, x - ( direction * ( j + 7 ) ), y - i + 1 ) ;
putpixel ( x - ( direction * ( j + 19 ) ), y - i - 1, 1 ) ;

for ( ; i < 3 ; i++, j -= 2 )
{
putpixel ( x - j, y + i, 1 ) ;
putpixel ( x + j, y + i, 1 ) ;
}

line ( x - j, y + i, x + j, y + i ) ;
putpixel ( x - j + 3, y + i + 1, 1 ) ;
putpixel ( x + j - 3, y + i + 1, 1 ) ;
line ( x - j - 10, y + i + 2, x + j + 10, y + i + 2 ) ;
putpixel ( x + ( direction * ( j + 12 ) ), y + i + 1, 1 ) ;
return 0;
}

void cwg_logo()
{
int i;
setcolor(BLUE);
settextstyle(TRIPLEX_FONT,0,2);
outtextxy(478,89,"DELHI 2010");
for(i=0;i<50;i++)
{
delay(i);
}
settextstyle(SMALL_FONT,0,4);
outtextxy(471,112,"XIX COMMONWEALTH GAMES");
for(i=0;i<50;i++)
{
delay(i);
}
setcolor(YELLOW);
setfillstyle(SOLID_FILL,YELLOW);
pieslice(538,170,85,95,30);
setcolor(RED);
setfillstyle(SOLID_FILL,RED);
pieslice(527,164,85,95,24);
setcolor(LIGHTBLUE);
setfillstyle(SOLID_FILL,LIGHTBLUE);
pieslice(548,164,85,95,24);
setcolor(8);
for(i=0;i<=10;i++)
{
ellipse(520,140,180,270,30-i,18);
ellipse(555,140,270,360,30-i,18);
}
setfillstyle(SOLID_FILL,8);
bar(480,127,595,131);
setcolor(BLUE);
settextstyle(SMALL_FONT,0,2);
outtextxy(503,175,"COME OUT AND PLAY");
for(i=0;i<50;i++)
{
delay(i);
}
setcolor(8);
for(i=0;i<3;i++)
{
circle(535,130,74);
circle(535,130,80-i);
}
}

void main()
{
int d=0,m=0,x,y,i,h1,h2,dl;
initgraph(&d,&m,"c:\\tc\\bgi");
setbkcolor(0);
clrscr();


setcolor(LIGHTGREEN);
outtextxy(70,200,"Commonwealth Games");
outtextxy(70,210,"Delhi 2010");
outtextxy(70,220,"81 seconds");
outtextxy(70,230,"Young Indian creations");
outtextxy(70,240,"11 07 2010");
for(dl=0;dl<100;dl++)
{
delay(dl);
}
cleardevice();
settextstyle(SANS_SERIF_FONT,0,2);
outtextxy(150,90,"My sincere thanx to my encouraged friends");
settextstyle(DEFAULT_FONT,0,1);
outtextxy(150,125,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
for(dl=0;dl<55;dl++)
{
delay(dl);
}
outtextxy(280,140,"S.Sinivas Rao sir");
outtextxy(280,155,"ShivaRam");
outtextxy(280,170,"SaiKrishna");
outtextxy(280,185,"Gopika");
outtextxy(280,200,"Divyanand");
outtextxy(280,215,"Sridhar");
outtextxy(280,235,"And all my friends");
for(dl=0;dl<100;dl++)
{
delay(dl);
}
cleardevice();
settextstyle(SANS_SERIF_FONT,0,2);
outtextxy(150,120,"My special thanx to my dear bro.");
settextstyle(GOTHIC_FONT,0,6);
outtextxy(230,170,"sunny");
settextstyle(DEFAULT_FONT,0,1);
for(dl=0;dl<90;dl++)
{
delay(dl);
}
setpalette(0,7);
//draws n moves Hero Honda
for(x=0;x<740;x++)
{

setcolor(8);
rotate_wheel(x,230,x%60);
delay(5);
rotate_wheel(x,230,x%60);
rotate_wheel(x-120,230,x%60);
setfillstyle(BKSLASH_FILL,random(16));//Petrol tank
setcolor(8);
fillellipse(x-30,175,40,20);
setcolor(WHITE);
//Engine
//{
circle(x-60,215,18);
circle(x-60,215,17);
circle(x-60,215,15);
circle(x-60,215,13);
circle(x-60,215,5);
//}
setcolor(random(16));
outtextxy(x-80,205,"HERO");
outtextxy(x-80,215,"HONDA");
for(i=0;i<4;i++)
{
ellipse(x-25,160,0,85,30-i,40-i);

}
//seat
setcolor(8);
setfillstyle(SOLID_FILL,8);
fillellipse(x-118,185,55,12);
pieslice(x-150,195,80,230,23);
pieslice(x-70,180,70,170,9);
setfillstyle(SOLID_FILL,8);//HEAD LIGHT
setcolor(random(16));
pieslice(x+20,155,80,275,20);
setfillstyle(SOLID_FILL,random(16));
fillellipse(x-120,230,45,7);
for(i=0;i<3;i++)
{
ellipse(x-160,175,0,180,5-i,25-i);
}

for(i=0;i<4;i++)
{
setcolor(random(16));
ellipse(x+30,170,76,180,25-i,45-i);

}
delay(5);
cleardevice();
rotate_wheel(x-120,230,x%60);

}
for(i=620;i>=205;i--)
{
rotate_wheel(i,230,i%60);
delay(10);
cleardevice();
rotate_wheel(i,230,i%60);
if(i>=300)
{
flag(i);
}
flag(300);
}
for(y=i;y>=110;y--)
{
rotate_wheel(i,y,y%60);
delay(10);
cleardevice();
flag(300);
rotate_wheel(i,y,y%60);

}
cleardevice();
flag(300);
ashoka_wheel(i,y,y%60);
for(h1=0,h2=550;h1<550;h1=h1+2,h2=h2-2)
{
heli_draw(h1,30,0);
heli_draw(h2,30,1);
delay(10);
cleardevice();
flag(300);
ashoka_wheel(i,y,y%60);
}
flag(300);
ashoka_wheel(i,y,y%60);
for( ;h2<550;h1=h1-2,h2=h2+2)
{
heli_draw(h1,30,1);
heli_draw(h2,30,0);
delay(10);
cleardevice();
flag(300);
ashoka_wheel(i,y,y%60);
}
flag(300);
ashoka_wheel(i,y,y%60);
for(dl=0;dl<45;dl++)
{
delay(dl);
}
settextstyle(DEFAULT_FONT,0,2);
setcolor(GREEN);
outtextxy(362,348,"DHAK DHAK GO");
setcolor(RED);
outtextxy(360,350,"DHAK DHAK GO");
for(dl=0;dl<35;dl++)
{
delay(dl);
}
cwg_logo();
for(dl=0;dl<35;dl++)
{
delay(dl);
}
settextjustify(CENTER_TEXT,CENTER_TEXT);
setcolor(RED);
settextstyle(SANS_SERIF_FONT,0,1);
outtextxy(120,300,"Chalo");
for(dl=0;dl<35;dl++)
{
delay(dl);
}
setcolor(WHITE);
settextstyle(GOTHIC_FONT,0,6);
outtextxy(130,330,"INDIA");
for(dl=0;dl<35;dl++)
{
delay(dl);
}
setcolor(GREEN);
settextstyle(SANS_SERIF_FONT,0,1);
outtextxy(120,370,"Chalo");
for(dl=0;dl<80;dl++)
{
delay(dl);
}
cleardevice();
setbkcolor(8);
settextjustify(LEFT_TEXT,LEFT_TEXT);
settextstyle(SANS_SERIF_FONT,0,6);
setcolor(RED);
outtextxy(20,100,"Proud");
setcolor(WHITE);
outtextxy(20,180,"To be");
setcolor(GREEN);
settextstyle(GOTHIC_FONT,0,13);
outtextxy(20,350,"An Indian");
for(dl=0;dl<90;dl++)
{
delay(dl);
}
cleardevice();
setbkcolor(0);
setcolor(LIGHTCYAN);
settextstyle(SANS_SERIF_FONT,0,5);
outtextxy(120,180,"Come out and play");
for(dl=0;dl<30;dl++)
{
delay(dl);
}
setcolor(YELLOW);
settextstyle(SANS_SERIF_FONT,0,7);
outtextxy(120,300,"Dhak Dhak Go");
for(dl=0;dl<55;dl++)
{
delay(dl);
}
cleardevice();
setcolor(LIGHTGREEN);
settextstyle(SANS_SERIF_FONT,0,4);
outtextxy(140,200,"Created by");
settextstyle(SANS_SERIF_FONT,0,5);
outtextxy(140,250,"Srikanth Noundla");
getch();
closegraph();
}