Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!