write a program to enter 3 sides of a triangle and find whether triangle is possible or not
Share
write a program to enter 3 sides of a triangle and find whether triangle is possible or not
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
hope it helps you....
Explanation:
Logic to check triangle
validity if angles are given
Input all three angles of triangle in some variable say angle1 , angle2 and angle3 .
Find sum of all three angles, store sum in some variable say sum = angle1 + angle2 + angle3 .
Check if(sum == 180) then, triangle can be formed otherwise not.
plz mark me as brainleast plz plz plz....
also follow me plz.....
My dear, I think you read the question incomplete or wrote in mistake. At every side length, a triangle is possible. So it will be applicable in case of angles.
PYTHON
----------------------------
angle1=int(input("Write first angle:"))
angle2=int(input("Write second angle:"))
angle3=int(input("Write third angle:"))
sum=angle1+angle2+angle3
if sum<=180:
print("Triangle can be made")
else
print("Triangle is not possible")
-----------------
Hope it helps!!!!!
For queries, write back in comments