Q:

Function moverel in C using graphics.h

0

Function moverel in C using graphics.h

Function moverel moves the current position to a relative distance.

Declaration: void moverel(int x, int y);

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include 
#include 

main()
{
   int gd = DETECT, gm, x, y;
   char message[100];

   initgraph(&gd, &gm, "C:\\TC\\BGI");

   moveto(100, 100);
   moverel(100, -100);

   x = getx();
   y = gety();

   sprintf(message, "Current x position = %d and y position = %d", x, y);
   outtextxy(10, 10, message);

   getch();
   closegraph();
   return 0;
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now