Write a program to enter three angles from the user and determine if the three angles represent a triangle or not. The sum of the three angles of a triangle is always equal to 180°. Write a message to the user if “The angles represent a triangle" or “The angles do not represent a triangle."

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.5: A Closer Look: Loop Programming Techniques
Problem 15E: (Program) Write a program to simulate the rolling of two dice. If the total of the two dice is 7 or...
icon
Related questions
Question
Please use python idle program and take a screenshot of the executable code
Write a program to enter three angles from the user and determine if the three angles represent
a triangle or not. The sum of the three angles of a triangle is always equal to 180°. Write a
message to the user if "The angles represent a triangle" or “The angles do not represent a
triangle."
Example run #1:
Enter the first angle of the triangle: 50
Enter the second angle of the triangle: 60
Enter the third angle of the triangle: 70
The angles represent a triangle
Example run #2:
Enter the first angle of the triangle: 120
Enter the second angle of the triangle: 40
Enter the third angle of the triangle: 30
The angles do not represent a triangle
Transcribed Image Text:Write a program to enter three angles from the user and determine if the three angles represent a triangle or not. The sum of the three angles of a triangle is always equal to 180°. Write a message to the user if "The angles represent a triangle" or “The angles do not represent a triangle." Example run #1: Enter the first angle of the triangle: 50 Enter the second angle of the triangle: 60 Enter the third angle of the triangle: 70 The angles represent a triangle Example run #2: Enter the first angle of the triangle: 120 Enter the second angle of the triangle: 40 Enter the third angle of the triangle: 30 The angles do not represent a triangle
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Input devices
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning