Professional Documents
Culture Documents
Test
Test
h>
#include <graphics.h>
#include <stdlib.h>
#include <conio.h>
#include <bios.h>
void main()
{
int grd, grm;
int num, xpos, ypos, i, j, index;
detectgraph(&grd,&grm);
initgraph(&grd, &grm, "");
if( graphresult() != 0)
{
printf("Unable to find Graphics driver");
return;
}
num = getmaxcolor();
settextjustify(CENTER_TEXT, CENTER_TEXT);
xpos = getmaxx() / 2;
ypos = getmaxy() / 2;
setbkcolor(BLUE);
setcolor(WHITE);
rectangle(1,1,getmaxx() - 1, getmaxy() - 1);
for(j = 1; j <= 11; j++)
{
circle(30, j * 40, 18);
circle(getmaxx() - 30, j * 40, 18);
}
index = 0;
for(i = BLUE + 1; i < num; i++)
{
setcolor(i);
outtextxy(xpos,50 + (index++ * 30),"Welcome to http://www.softwarean
dfinance.com");
}
getch();
closegraph();
}