#include<conio.h>
#include<stdio.h>
#include<iostream.h>
#include<graphics.h>
#include<stdlib.h>
#include<ctype.h>
void main()
{
clrscr();
int gd=DETECT,gm,errorcode;
initgraph(&gd,&gm,"C:\\TC\\BGI");
errorcode=graphresult();
if(errorcode!=grOk)
{
cout<<"graphics error occured:%s\n"<<grapherrormsg(errorcode)<<endl;
cout<<"press any key to stop:";
getch();
exit(1);
}
for(int x=0;x<=15;x++)
{
setbkcolor(x);
getch();
}
closegraph();
}
#include<stdio.h>
#include<iostream.h>
#include<graphics.h>
#include<stdlib.h>
#include<ctype.h>
void main()
{
clrscr();
int gd=DETECT,gm,errorcode;
initgraph(&gd,&gm,"C:\\TC\\BGI");
errorcode=graphresult();
if(errorcode!=grOk)
{
cout<<"graphics error occured:%s\n"<<grapherrormsg(errorcode)<<endl;
cout<<"press any key to stop:";
getch();
exit(1);
}
for(int x=0;x<=15;x++)
{
setbkcolor(x);
getch();
}
closegraph();
}
No comments:
Post a Comment