Switch case. Statement | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Switch case. Statement

find area of triangle,square,rectangle,circle

12th Mar 2021, 2:15 PM
Sahoo Nandhan
2 Answers
+ 3
Area of circle = πr² //r is the radius π is a constant == 22/7 Area of square = a² // a is the length of a side of square Area of rectangle = ab // a is width & b is height Area of triangle = √(s(s-a)(s-b)(s-c)) // a,b,c are 3 sides of triangle and s is ((a+b+c)/2)
12th Mar 2021, 2:31 PM
TOLUENE
TOLUENE - avatar
+ 2
Area of triangle can also be found by using below formula ∆ = 1/2.0*bh Where b is breath of triangle and h is hight of triangle You need one segment of breath and distance height as a perpendicular distance between a point and segment line. DHANANJAY
12th Mar 2021, 2:44 PM
DHANANJAY PATEL
DHANANJAY PATEL - avatar