Submit two c++ files: 1. a. Define an enumeration type, triangleType, that has the values scalene, isosceles, equilateral, and noTriangle. b. Write a function, triangleShape,
Submit two c++ files: 1.
a. Define an enumeration type, triangleType, that has the values scalene, isosceles, equilateral, and noTriangle. b. Write a function, triangleShape, that takes as parameters three num- bers, each of which represents the length of a side of the triangle. The function should return the shape of the triangle. (Note: In a triangle, the sum of the lengths of any two sides is greater than the length of the third side.) c. Write a program that prompts the user to input the length of the sides of a triangle and outputs the shape of the triangle.
2. Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations:
a. Double the number.
b. Reverse the digits of the number.
c. Raise the number to the power of 2, 3, or 4.
d. Sum the digits of the number.
e. If the number is a two digit number, then raise the first digit to the power of the second digit. f. If the number is a three digit number and the last digit is less than or equal to 4, then raise the first two digits to the power of the last digit.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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