Sunday, September 3, 2017

CG3

Code:

#include<iostream.h>
#include<conio.h>
#include<graphics.h>
void main(){

    int g=DETECT,gmode;
    initgraph(&g,&gmode,"C://TURBOC3//BGI");
    setcolor(10);
    setbkcolor(15);
    settextstyle(SANS_SERIF_FONT,HORIZ_DIR,5);
    outtextxy(100,100,"HELLO WORLD!");
    setcolor(20);
    settextstyle(DEFAULT_FONT,HORIZ_DIR,5);
    outtextxy(100,200,"HELLO WORLD!");
    setcolor(25);
    settextstyle(BOLD_FONT,HORIZ_DIR,5);
    outtextxy(100,300,"HELLO WORLD!");
    getch();
}

Output: