Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please do in C++, and also please include comments HOMEWORK #8-Triangle Classification Based upon the lengths of the 3 sides, determine if a triangle is
Please do in C++, and also please include comments
HOMEWORK #8-Triangle Classification Based upon the lengths of the 3 sides, determine if a triangle is scalene, isosceles, or equilateral, or if the sides do not form a triangle For a triangle to exist, the sum of the lengths of any two sides is greater than the length of the third side. Specifications: Write a program that: 1. Defines an enumeration type, triangleType that has the values scalene, isosceles, equilateral, and noTriangle. 2. Wraps the enumeration type in a namespace called Triangle. Uses a function, triangleShape, that takes three numbers as formal parameters, each of which represents the length of a side of the triangle. The function should then return the shape of the triangle. 3. Prompts the user to input the length of the sides of a triangle and outputs the shape of the triangle. 4. Use the following function prototype for the triangleShape function: // Determines if the three sides form a triangle Triangle::triangleType triangleShape (int a, int b, int c) Note: You are NOT allowed to any: using namespace namespaceVariStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started