Advertisement
zoro-10

2A. Divide your screen into four regions, draw circle, rectangle, ellipse and half ellipse in each

Apr 1st, 2024
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. #include<graphics.h>
  2. #include<stdio.h>
  3. #include<conio.h>
  4. void main()
  5. {
  6. int gd=DETECT,gm;
  7. initgraph(&gd,&gm,"C:\\TurboC3\\BGI");
  8. line(319,0,319,479);
  9. line(0,239,639,239);
  10. circle(159,119,30);
  11. outtextxy(170,170,"Circle");
  12. rectangle(390,150,500,210);
  13. outtextxy(410,220,"Rectangle");
  14. ellipse(200,319,0,360,50,25);
  15. outtextxy(239,360,"Ellipse");
  16. ellipse(400,350,90,270,50,25);
  17. outtextxy(430,390,"Half Ellipse");
  18. getch();
  19. closegraph();
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement