Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
soumen1102 committed Sep 22, 2013
0 parents commit 84b21fd
Show file tree
Hide file tree
Showing 163 changed files with 14,225 additions and 0 deletions.
68 changes: 68 additions & 0 deletions 3D.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#include<graphics.h>
void main()
{
int x=320,y,r=2,gd=DETECT,gm;
initgraph(&gd,&gm,"");

while(!kbhit())
{
for(y=200;y>50;y-=5)
{
setcolor(LIGHTGRAY);
setbkcolor(BLACK);
setfillstyle(SOLID_FILL,LIGHTGRAY);
circle(x,y,r);
floodfill(x,y,LIGHTGRAY);
delay(40);
setfillstyle(SOLID_FILL,BLACK);
setcolor(BLACK);
circle(x,y,r);
floodfill(x,y,BLACK);
r++;
}
for(y=50;y<200;y+=5)
{
setcolor(LIGHTGRAY);
setbkcolor(BLACK);
setfillstyle(SOLID_FILL,LIGHTGRAY);
circle(x,y,r);
floodfill(x,y,LIGHTGRAY);
delay(40);
setcolor(BLACK);
setfillstyle(SOLID_FILL,BLACK);
circle(x,y,r);
floodfill(x,y,BLACK);
r++;
}
for(y=200;y<350;y+=5)
{
setcolor(LIGHTGRAY);
setbkcolor(BLACK);
setfillstyle(SOLID_FILL,LIGHTGRAY);
circle(x,y,r);
floodfill(x,y,LIGHTGRAY);
delay(40);
setcolor(BLACK);
setfillstyle(SOLID_FILL,BLACK);
circle(x,y,r);
floodfill(x,y,BLACK);
r--;
}
for(y=350;y>200;y-=5)
{
setcolor(LIGHTGRAY);
setbkcolor(BLACK);
setfillstyle(SOLID_FILL,LIGHTGRAY);
circle(x,y,r);
floodfill(x,y,LIGHTGRAY);
delay(40);
setcolor(BLACK);
setfillstyle(SOLID_FILL,BLACK);
circle(x,y,r);
floodfill(x,y,BLACK);
r--;
}
}
closegraph();
restorecrtmode();
}
132 changes: 132 additions & 0 deletions 3DX.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
#include<graphics.h>
void main()
{
int x=250,y,r=20,rr,gd=DETECT,gm;
initgraph(&gd,&gm,"");

setcolor(RED);
rectangle(10,10,630,470);
rectangle(11,11,629,469);
setcolor(LIGHTRED);
rectangle(9,9,631,471);
while(!kbhit())
{
r=20;
for(y=320;y>90;y-=7)
{
setcolor(LIGHTGRAY);
setbkcolor(BLACK);
setfillstyle(SOLID_FILL,LIGHTGRAY);
circle(y,x,r);
rr=r;
while(rr>0)
{
circle(y,x,rr);
rr--;
}

//floodfill(y,x,LIGHTGRAY);
delay(50);
setfillstyle(SOLID_FILL,BLACK);
setcolor(BLACK);
circle(y,x,r);
rr=r;
while(rr>0)
{
circle(y,x,rr);
rr--;
}

//floodfill(y,x,BLACK);
r++;
}
delay(50);
for(y=90;y<320;y+=7)
{
setcolor(LIGHTGRAY);
setbkcolor(BLACK);
//setfillstyle(SOLID_FILL,LIGHTGRAY);
circle(y,x,r);
rr=r;
while(rr>0)
{
circle(y,x,rr);
rr--;
}

//floodfill(y,x,LIGHTGRAY);
delay(50);
setcolor(BLACK);
setfillstyle(SOLID_FILL,BLACK);
circle(y,x,r);
rr=r;
while(rr>0)
{
circle(y,x,rr);
rr--;
}

//floodfill(y,x,BLACK);
r++;
}
for(y=320;y<570;y+=7)
{
setcolor(LIGHTGRAY);
setbkcolor(BLACK);
setfillstyle(SOLID_FILL,LIGHTGRAY);
circle(y,x,r);
rr=r;
while(rr>0)
{
circle(y,x,rr);
rr--;
}

//floodfill(y,x,LIGHTGRAY);
delay(50);
setcolor(BLACK);
setfillstyle(SOLID_FILL,BLACK);
circle(y,x,r);
rr=r;
while(rr>0)
{
circle(y,x,rr);
rr--;
}

//floodfill(y,x,BLACK);
r--;
}
delay(50);
for(y=570;y>320;y-=7)
{
setcolor(LIGHTGRAY);
setbkcolor(BLACK);
setfillstyle(SOLID_FILL,LIGHTGRAY);
circle(y,x,r);
rr=r;
while(rr>0)
{
circle(y,x,rr);
rr--;
}

//floodfill(y,x,LIGHTGRAY);
delay(50);
setcolor(BLACK);
setfillstyle(SOLID_FILL,BLACK);
circle(y,x,r);
rr=r;
while(rr>0)
{
circle(y,x,rr);
rr--;
}

//floodfill(y,x,BLACK);
r--;
}
}
closegraph();
restorecrtmode();
}
2 changes: 2 additions & 0 deletions A.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

500 d
Binary file added A2.C
Binary file not shown.
16 changes: 16 additions & 0 deletions AC.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <stdio.h>
main()
{

struct mystruct
{
int i;
char ch;
}e;
FILE *pt ;
pt=fopen("a.c","a");
e.i=500;
e.ch='d';
fprintf(pt,"\n %d \t\t %c",e.i,e.ch);
fclose(pt);
}
82 changes: 82 additions & 0 deletions ANA.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#include<graphics.h>
#include<stdio.h>
#include<dos.h>
void main()
{
int gd=DETECT,gm,x,y,p,q,cord[70][2]={
{320,70},
{334,76},
{352,82},
{374,88},
{396,94},
{410,110},
{419,119},
{428,128},
{437,140},
{446,152},
{450,162},
{456,179},
{462,191},
{468,208},
{472,224},
{479,240},
{470,250},
{460,260},
{450,270}, {456,300},
{440,280},
{430,290},
{420,300},
{410,310},
{400,320},
{390,330},
{380,340},
{370,350},
{360,360},
{350,370},
{320,390}
};
initgraph(&gd,&gm,"");
cleardevice();
setcolor(LIGHTGRAY);
setbkcolor(WHITE);
//circle(320,240,180);
//circle(320,240,185);
//setfillstyle(CLOSE_DOT_FILL,LIGHTRED);
//floodfill(503,423,LIGHTRED);
circle(320,240,5);
setfillstyle(SOLID_FILL,LIGHTGRAY);
floodfill(320,240,LIGHTGRAY);
settextstyle(3,0,3);
outtextxy(308,60,"12");
outtextxy(315,390,"6");
outtextxy(480,220,"3");
outtextxy(150,225,"9");
outtextxy(400,85,"1");
outtextxy(455,145,"2");
outtextxy(456,305,"4");
outtextxy(400,365,"5");
outtextxy(175,305,"8");
outtextxy(227,365,"7");
outtextxy(165,145,"10");
outtextxy(220,85,"11");
setlinestyle(SOLID_LINE,2,2);
line(320,240,320,80);
p=0;
q=0;
delay(580);
while(q<30)
{
delay(590);
setcolor(WHITE);
line(320,240,cord[p][0],cord[p][1]);
setcolor(LIGHTGRAY);
p++;
line(320,240,cord[p][0],cord[p][1]);

q++;
}

getchar();
closegraph();
restorecrtmode();
}
6 changes: 6 additions & 0 deletions ARR.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
void main()
{
static char arr[]={"hhhhh"};
printf("%s",arr);
getch();
}
Loading

0 comments on commit 84b21fd

Please sign in to comment.