Write a program Translation of Line.

//3. Write a program to Implement Translation?
//Translation
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <iostream.h>
int x1,y1,x2,y2,x,y;
int main(void)
{
	int gdriver = DETECT, gmode, errorcode;
	initgraph(&gdriver, &gmode, "c:\\tc\\bgi");
	cout<<"enter the values of line coordinates:";
	cin>>x1>>y1>>x2>>y2;
	cout<<"enter the translation coordinates:";
	cin>>x>>y;
	cleardevice();
	line(x1,y1,x2,y2);
	cout<<"now hit a key to see translation:";
	line(x1+x,y1+y,x2+x,y2+y);
	getch();
	closegraph();
}