Untitled
unknown
plain_text
2 years ago
433 B
4
Indexable
#include<stdio.h> #include<graphics.h> #include<stdlib.h> #include<math.h> int gd=DETECT,gm; void main() { int x1,y1,x2,y2; printf("Enter the co-ordinate x1 and y1:"); scanf("%d%d",&x1,&y1); printf("Enter the co-ordinate x2 and y2:"); scanf("%d%d",&x2,&y2); initgraph(&gd,&gm,NULL); line(0,100,200,100); setcolor(4); rectangle(x1,y1-100,x2,y2-100); setcolor(6); rectangle(x1,y1+100,x2,y2+100); getch(); closegraph(); }
Editor is loading...
Leave a Comment