Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<graphics.h>
- #include<iostream.h>
- #include<conio.h>
- #include<math.h>
- void main()
- {
- int gd=DETECT,gm,x2,y2,x1,y1,x,y;
- initgraph(&gd,&gm,"C:\\TurboC3\\BGI");
- cout<<"Enter the value of x1 and y1: ";
- cin>>x1>>y1;
- cout<<"Enter the value of x2 and y2: ";
- cin>>x2>>y2;
- line(x1,y1,x2,y2);
- cout<<"Enter scaling co-ordinates: ";
- cin>>x>>y;
- x1=(x1*x);
- y1=(y1*y);
- x2=(x2*x);
- y2=(y2*y);
- cout<<"Line after scaling";
- line(x1,y1,x2,y2);
- getch();
- closegraph();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement