-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3.c
More file actions
42 lines (28 loc) · 632 Bytes
/
3.c
File metadata and controls
42 lines (28 loc) · 632 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//3. WAP to draw basic shapes [Hint: line, rectangle, triangle, square, circle, ellipse, arc and polygon]
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gdrive=DETECT,gmode;
int arr[] ={300,300,420,270,340,470,300,300};
initgraph(&gdrive, &gmode,"C:/turboc3/bgi");
//rectangle
rectangle(30,90,200,180);
//triangle
line(430,80,360,180);
line(360,180,500,180);
line(500,180,430,80);
//square
rectangle(100,300,200,400);
//Polygon
drawpoly(4,arr);
//Circle
circle(570,130,50);
//arc
arc(530,380,0,100,50);
//ellipse
ellipse(300,140,0,240,30,100);
getch();
closegraph();
}