Program to draw 2 rectangles and fill 1 of them in cpp
#include <iostream.h> #include <conio.h> #include <graphics.h> #include <ctype.h> #include <stdlib.h> #include <stdio.h> void main() { clrscr(); int gd = DETECT,gm,errorcode; //Requesting auto-detection. //Initializing graphics and local variables. initgraph (&gd, &gm, “d:\bc3\bgi”); //Path where graphics drivers are installed //Read result of initialization. errorcode = graphresult(); //An error occured. if (errorcode != grOk) { cout << … Read more