Program to perform transformation of a circle

/* Program to perform transformation of a circle */

#include<iostream.h>
#include<graphics.h>
#include<conio.h>
void main()
{
int x1,x2,y1,y2,r;
cout<<“\n\t\t\t\*To transform a circle*\n”;
cout<<“\nenter the x and y coordinates:-\n”;
cin>>x1>>y1;
cout<<“\nenter the radius:-\n”;
cin>>r;
cout<<“\nenter the extent upto which x coordinate to shifted:-\n”;
cin>>x2;
cout<<“\nenter the extent upto which y coordinate to be shifted:-\n”;
cin>>y2;
int gd=DETECT,gm;
initgraph(&gd,&gm,””);
setbkcolor(WHITE);
setcolor(8);
circle(x1,y1,r);
circle(x1+x2,y1+y2,r);
setcolor(8);
outtextxy(115,70,”Transformation of a circle”);
getch();
}

Leave a Reply

Your email address will not be published. Required fields are marked *