Sunday, September 3, 2017

CG2

Code:

#include<iostream.h>
#include<conio.h>
#include<graphics.h>
void main(){
    
    int g=DETECT,gmode;
    initgraph(&g,&gmode,"C://TURBOC3//BGI");
    line(10,90,300,90);
    setcolor(10);
    rectangle(10,100,300,250);
setcolor(30);
    circle(100,180,50);
setcolor(15);
    line(160,230,200,120);
    line(200,120,240,230);
    line(240,230,160,230);

    getch();
}

Output: