Write a menu driven program to calculate the are of equilateral & isosceles triangle | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Write a menu driven program to calculate the are of equilateral & isosceles triangle

Use the formula of -equilateral triangle= math.sqrt (3)/4.0*math.pow(S,2) and isosceles triangle 1/4.0*b*math.sqrt(4*math.pow(a,2)-math.pow(b,2)

21st Feb 2018, 1:15 PM
Nikhil Sharma
Nikhil Sharma - avatar
2 Answers
- 2
You can use a switch case for this program
24th Feb 2018, 7:54 AM
Mayank Bajaj
Mayank Bajaj - avatar
0
Write a Menu Driven program to find the area of an equilateral triangle, an isosceles triangle and a scalene triangle as per user’s choice. (i) Area of Equilateral triangle = √𝟑 𝟒 𝒔 𝟐 (ii) Area of Isosceles triangle = 𝟏 𝟒 ∗ 𝒃 ∗ √𝟒𝒂𝟐 − 𝒃 𝟐 (iii) Area of Scalene triangle = √𝒔 ∗ 𝒔(𝒔 − 𝒂) ∗ (𝒔 − 𝒃) ∗ (𝒔 − 𝒄) , where s = (a +b + c)/2
18th Jul 2023, 1:42 PM
Aditi Jindal
Aditi Jindal - avatar