You are on page 1of 2

Graphics 3

============================================
#include <iostream.h>
#include <conio.h>
#include <graphics.h>
#include <dos.h>
void main()
{
clrscr();
int gdriver = DETECT , gmode;
initgraph (&gdriver,&gmode,"d:\\turbo\\tc\\bgi");

//line (100,100,150,150);
int x1=150,x2=50,y1=150,y2=150;
for (int i=1;i<=50;i++)
{
line (x1,y1,x2,y2);
x1--;
y1--;
x2++;
y2--;
//line (150,150,50,150);

}
/*
x1=150,x2=250,y1=150,y2=150;
for (int k=1;k<=50;k++)
{
line (x1,y1,x2,y2);
//x1--;
y1--;
x2-=2;
y2--;
//line (150,150,50,150);

//line (50,150,100,100);

//circle (125,125,25);
// setfillstyle(SOLID_FILL,GREEN);
// floodfill(125,125,WHITE);
/*
//setcolor(BLUE);
for (int i=0;i<12;i++)
{
setcolor(i);
circle (300,200,50);
setfillstyle(i,YELLOW);
floodfill(280,180,i);
delay(500);
}
*/

getch();

http://www.ravianeducation.blogspot.com
FARHAN: 03008855006