Program to change the background colors on the screen
void main (int)
int gdriver=DETECT,gmode,errorcode; //Requesting auto-detection.
//Initializing graphics and local variables.
//Reading result of initialization.
//An error occurred.
printf("Graphics error occurred : %s \n",grapherrormsg(errorcode));
printf("Press any key to stop : ");
exit(1); //Terminate the program due to error.
/*Changing the background color.
Note : Press enter to see the first screen as it is black and
it may appear as if the program has stopped running.*/
This graphics program changes the background colors on the screen gradually from black to white using the 'setbkcolor' command.