Program to Draw 3D rectangle

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>


void main()
{
  clrscr();
  int gm=DETECT,gd,i;


   initgraph(&gm,&gd,"");
  for(i=0;i<15;i++)
  {

   setcolor(i+1);
       rectangle(10+i,10+i,200+i,200+i);
     }
  getch();
}

Leave a Reply