Question: 1 . Write a C + + program that does the following: a . Create a C + + file with the name problem 2
Write a C program that does the following:
a Create a C file with the name problemcpp
b Prompt the user to enter three angle values in degrees.
c Checks and prints whether the three given angles form a triangle. If the three angles add up to then they form a triangle.
d If the three given angles form a triangle, then the program determines and prints whether the triangle is equilateral, right, or neither.
e An equilateral triangle has three degree angles.
f A right triangle has one degree angle.
Sample run of the program:
Enter an angle in degrees:
Enter an angle in degrees:
Enter an angle in degrees:
Can form a triangle from these angles.
The triangle is a right triangle.
Sample run of the program:
Enter an angle in degrees:
Enter an angle in degrees:
Enter an angle in degrees:
Can form a triangle from these angles.
The triangle is neither equilateral nor right.
Sample run of the program:
Enter an angle in degrees:
Enter an angle in degrees:
Enter an angle in degrees:
Cannot form a triangle from these angles.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
