Question
Need this within one hour of posting Need ASAP !!! Will rate Write a C++ console application to d efine an enumeration type Shape that
Need this within one hour of posting
Need ASAP !!!
Will rate
Write a C++ console application to define an enumeration type Shape that has the exact values [triangle, square, pentagon, hexagon, cube, sphere, cone, cylinder].
Write function printShapes that takes an argument of type Shape. The function will test the argument and print out "2D shape" if the shape is triangle, square, pentagon, or hexagon, and will print out "3D shape" otherwise. Your selection structure should use a relational expression.
Your main function will prompt the user for a number and convert the number to a enumeration type Shapevalue:
0 = triangle
1 = square
2 = pentagon
3 = hexagon
4 = cube
5 = sphere
6 = cone
7= cylinder
Your output should look like this one:
Step 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