This repository was archived by the owner on Mar 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathperimeter.bas
More file actions
61 lines (55 loc) · 1.57 KB
/
perimeter.bas
File metadata and controls
61 lines (55 loc) · 1.57 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Print "For which 2D shape you want to find the area of?"
Print "For square type = 1"
Print "For rectangle type = 2"
Print "For circle type = 3"
Print "For triangle type = 4"
Print "For parallelogram type = 5"
Print "For trapezium type = 6"
Print "For rhombus type = 7"
Input area
Cls
If area = 1 Then
Print "What is the side of the square?"
Input side
Print side * 4; "is the perimeter!"
End If
If area = 2 Then
Print "What is the length of the rectangle?"
Input length
Print "What is the breadth?"
Input breadth
Print 2 * (length + breadth); "is the perimeter!"
End If
If area = 3 Then
Print "What is the radius of the circle?"
Input radius
Print 2 * 22 / 7 * radius; "is the perimeter!"
End If
If area = 4 Then
Print "What are the sides of the triangle?"
Input s1
Input s2
Input s3
Print s1+s2+s3; "is the perimeter!"
End If
If area = 6 Then
Print "Enter the sides of the trapezium"
Input s1
Input s2
Input s3
Input s4
Print s1 + s + s3 + s4; "is the perimeter!"
End If
If area = 5 Then
Print "What is the length of the parallelogram?"
Input length
Print "What is the breadth?"
Input breadth
Print 2 * (length + breadth); "is the perimeter!"
End If
If area = 7 Then
Print "What is the side of the rhombus?"
Input side
Print side * 4; "is the perimeter!"
End If
End If