/*
Write a program in C for getmaxcolor
*/
#include<graphics.h>
#include<conio.h>
main()
{
int gd = DETECT, gm, max_colors;
char a[100];
initgraph(&gd,&gm,"C:\\TC\\BGI");
max_colors = getmaxcolor();
sprintf(a,"Maximum number of colors for current graphics mode and driver = %d",max_colors+1);
outtextxy(0, 40, a);
getch();
closegraph();
return 0;
}
0 Comments