Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
587 B
1
Indexable
Never
#include<stdio.h>
#include<conio.h>
#include<dos.h>
#include<graphics.h>
void main()
{
	int gd=DETECT,gm;
	float shx,shy;
	initgraph(&gd,&gm,"C:\\TurboC3\\BGI");
	printf("Enter shear factor shx along x-axis :");
	scanf("%f",&shx);
	line(200,100,300,100);
	line(300,100,300,300);
	line(300,300,200,300);
	line(200,300,200,100);
	printf("X-shear");
	setcolor(12);
	line((200+(100*shx)),100,(300+(100*shx)),100);
	line((300+(100*shx)),100,(300+(300*shx)),300);
	line((300+(300*shx)),300,(200+(300*shx)),300);
	line((200+(300*shx)),300,(200+(100*shx)),100);
	getch();
}