#include<stdio.h> #include<conio.h> #include<graphics.h> main() { int gd,gm; detectgraph(&gd,&gm); clrscr(); initgraph(&gd,&gm,"c://turboc3/bgi"); circle(100,100,100); circle(100,100,50); getch(); closegraph(); }
#include<stdio.h> #include<conio.h> #include<graphics.h> main() { int gd,gm,i; detectgraph(&gd,&gm); clrscr(); initgraph(&gd,&gm,"c://turboc3/bgi"); for(int i=1;i<=10;i++) circle(100,100,i*10); getch(); closegraph(); }
#include<stdio.h> #include<conio.h> #include<graphics.h> main() { int gd,gm; int points[]={100,0,200,170,0,170,100,0}; detectgraph(&gd,&gm); clrscr(); initgraph(&gd,&gm,"c://turboc3/bgi"); setcolor(YELLOW); drawpoly(4,points); getch(); closegraph(); }
#include<stdio.h> #include<conio.h> #include<graphics.h> main() { int gd,gm; detectgraph(&gd,&gm); initgraph(&gd,&gm,"c://turboc3/bgi"); setcolor(CYAN); settextstyle(0,0,5); outtextxy(10,10,"CCIT Amravati"); getch(); closegraph(); }
#include<stdio.h> #include<conio.h> #include<graphics.h> main() { fint gd,gm; detectgraph(&gd,&gm); initgraph(&gd,&gm,"c://turboc3/bgi"); setfillstyle(1,CYAN); pieslice(200,200,0,30,190); setfillstyle(2,LIGHTGREEN); pieslice(200,200,30,120,190); setfillstyle(3,LIGHTCYAN); pieslice(200,200,120,230,190); setfillstyle(7,YELLOW); pieslice(200,200,230,360,190); getch(); closegraph(); }
#include<stdio.h> #include<conio.h> #include<graphics.h> main() { int gd,gm; detectgraph(&gd,&gm); initgraph(&gd,&gm,"c://turboc3/bgi"); for(i=0;i<=9;i++) { if(i%2) setfillstyle(1,LIGHTRED); else setfillstyle(1,LIGHTBLUE); circle(200,200,200-i*20); floodfill(200,200,WHITE); } getch(); closegraph(); }
#include<stdio.h> #include<conio.h> #include<graphics.h> main() { int gd,gm; detectgraph(&gd,&gm); initgraph(&gd,&gm,"c://turboc3/bgi"); for(i=0;i<=9;i++) { if(i%2) setfillstyle(1,LIGHTRED); else setfillstyle(1,LIGHTBLUE); circle(200,200,200-i*20); floodfill(200,200,WHITE); delay(1000); } getch(); closegraph(); }
#include<stdio.h> #include<conio.h> #include<graphics.h> main() { int gd,gm,i,x,y,r; detectgraph(&gd,&gm); initgraph(&gd,&gm,"c://turboc3/bgi"); for(i=1;i<=50;i++) { x=random(400); y=random(400); r=random(200); setfillstyle(1,i%6); fillellipse(x,y,r,r); delay(1000); } getch(); closegraph(); }
#include<stdio.h> #include<conio.h> #include<graphics.h> main() { int gd,gm,i,x,y; detectgraph(&gd,&gm); initgraph(&gd,&gm,"c://turboc3/bgi"); for(i=1;i<=50;i++) { x=200+100*cos(i); y=200+100*sin(i); circle(x,y,100); delay(100); } getch(); closegraph(); }
#include<stdio.h> #include<conio.h> #include<graphics.h> main() { int gd,gm,i,x,y; detectgraph(&gd,&gm); initgraph(&gd,&gm,"c://turboc3/bgi"); setcolor(LIGHTGREEN); for(i=1;i<=200;i++) { x=200+150*cos(i); y=200+150*sin(i); circle(x,y,50); delay(100); } setcolor(LIGHTRED); for(i=1;i<=200;i++) { =200+75*cos(i); y=200+75*sin(i); circle(x,y,25); delay(100); } getch(); closegraph(); }