Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help in C++ I have no idea from where to begun tho. All I have is the instructions and an output of the

I need help in C++ I have no idea from where to begun tho.

All I have is the instructions and an output of the actual code that's all. Plz Help!!

image text in transcribed

image text in transcribed

Objectives: Practice getting input from the user . Practice using loops and conditions Practice using arrays Assignment: Create a program that asks the user for how many sides their shape has and tell them what their shape is based on that. There must be three possible options: 3 (triangle), 4 (quadrilateral), and 5 (pentagon). You should create a corresponding array based on the shape sides. Once the shape is determined, gather the length of all the sides and place them in the array. Once done, total the sides in a loop to determine the perimeter and display that information to the user. Example Execution: How many sides does your shape have? 6 That's not a valid shape here. Try again. How many sides does your shape have? 4 You have a quadrilateral! What is the length of side 1: 3 What is the length of side 2: 0 I'm sorry, that's not a valid length. Try again. What is the length of side 2: 4 What is the length of side 3: 3 What is the length of side 4: 4 Your perimeter is: 14

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

3 What are the stages of Kotter and Cohens model of change?

Answered: 1 week ago

Question

4 What is organisation development?

Answered: 1 week ago

Question

5 What activities are employed in OD processes?

Answered: 1 week ago