Draw Shapes one by one using C/C++

#include<stdio.h>
#include<graphics.h>
#include<conio.h>
#include<dos.h>j
int main()
{
   int gd = DETECT,gm;
   int x ,y;
   initgraph(&gd, &gm, "");

  /* Draw line on screen */
   setcolor(RED);
   line(100,200,50,30);
   delay(500);
   setcolor(GREEN);
   line(100,400,55,50);
  delay(500);

   setcolor(YELLOW);
   line(100,300,70,45);
   delay(500);

   setcolor(GREEN);
   circle(100,150,45);


   getch();

   closegraph();
   return 0;
}

No comments:

Post a Comment