Program to show the working of settextjustify with different justification in vertical direction

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
  clrscr();
  int gm=DETECT,gd,i;
  initgraph(&gm,&gd,"");
settextjustify(0,0);  //(int horiz,int vert);
settextstyle(0,1,1); //(font,direction,charsize)
outtextxy(50,220," WELCOME TO GRAPHICS ");

settextjustify(0,1);
settextstyle(0,1,1);
outtextxy(150,250," WELCOME TO GRAPHICS ");

settextjustify(0,2);
settextstyle(0,1,1);
outtextxy(200,220," WELCOME TO GRAPHICS");
getch();
}

Leave a Reply