Plz solve these problems using "c" (graphics) [Solved/Closed]

ashes_2010 1 Posts Friday April 30, 2010Registration date April 30, 2010 Last seen - Apr 30, 2010 at 06:37 AM - Latest reply:  mahendra
- Feb 12, 2015 at 08:02 AM
1. Create Concentric Circles.
2. Draw Indian Flag.
3. Create a Spiral
4. Draw a line chart
5. Draw a pie chart
6. Draw a RAINBOW and fill the suitable colors
7. Draw a bar chart
8. Draw a Cycle
9. Draw a rotating wheel (movement)
10. Draw a Car figure and give animation (movement).
11. Draw a bird figure and give Flying animation
12. Draw a flower symbol
13. Design a human face
14. Design a fish and give movement with suitable animation function
15. Draw a kite figure and show flying with the help of animation function
See more 

9 replies

Best answer
44
Thank you
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gdriver=DETECT,gmode=0;
int i;
initgraph(&gdriver, &gmode,"c:\\tc\\bgi");
cleardevice();
rectangle(0,0,639,479);
outtextxy(280,20,"HUMAN FACE");
arc(320,190,180,120);
line(200.190,440,190);
arc(320,230,160,380,120);
arc(440,230,270,450,20);
arc(200,230,90,270,20);
circle(260,220,10);
circle(380,220,10);
for(i=0;i<2;i++)
{
arc(260,213+I,30,150,13);
arc(380,213+I,30,150,13);
}
line(320,240,302,280);
arc(320,270,210,330,20);
arc(320,290,210,330,30);
line(215,290,100,350);
line(100,350,90,440);
line(425,290,540,350);
line(540,350,550,440);
line(320,350,320,440);
getch();
}

Thank you, Satya 44

Something to say? Add comment

CCM has helped 1706 users this month

21
Thank you
FLAG HOSTING

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
#include<dos.h>

void main()
{
int gd=DETECT,gm,i,j,x,y,x1,y1;
initgraph(&gd,&gm,"");
x=getmaxx()/2;
y=getmaxy();
line(x,y,x,50);
line(x-6,y,x-6,50);
line(x-50,y-1,x-40,y-1);
line(x-6,50,x+50,50);
while(y>132)
{
setfillstyle(0,0);
bar(x+1,y-60,x+50,y-80);
bar(x+1,y-40,x+50,y-60);
bar(x+1,y-20,x+50,y-40);
y--;
setfillstyle(1,4);
bar(x+1,y-60,x+50,y-80);
setfillstyle(9,15);
bar(x+1,y-40,x+50,y-60);
setfillstyle(1,2);
bar(x+1,y-20,x+50,y-40);
delay(20);
}
getch();
}
nice idea u have anjali
thanks for giving answer dear...
11
Thank you
simple code to Draw Indian flag.
--------------------------------------------


#include<stdio.h>
#include<graphics.h>
#include<dos.h>
#include<conio.h>

void flag1();

void main()
{
int driver=DETECT,mode;
initgraph(&driver,&mode," ");

flag1();

getch();
closegraph();

}

void flag1()
{
int i;
setfillstyle(SOLID_FILL,6);
bar(50,50,300,100);
setfillstyle(SOLID_FILL,WHITE);
bar(50,100,300,150);
setfillstyle(SOLID_FILL,GREEN);
bar(50,150,300,200);
setfillstyle(SOLID_FILL,8);
bar(40,20,50,460); /* flagpole */
setcolor(9);
setfillstyle(SOLID_FILL,WHITE);

for(i=0;i<360;i=i+15)
pieslice(175,125,i,i+15,25);
}
11
Thank you
Concentric Circles
---------------------------------


#include<graphics.h>

main()
{
int gd=DETECT,gm;
int n,x=10;
initgraph(&gd,&gm," ");
printf("How many concentric circles do you want?");
scanf("%d",&n);
while(n!=0)
{
circle(240,150,x);
setcolor(GREEN);
x+=10;
n--;
}
getch();
closegraph();
}
how to rotate a circle in circular path. I'm going to code for solar system
2
Thank you
for programs take a look at : www.amruthadevim.wix.com