Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code in C++ Create a new project in Code::Blocks and design and implement a program that prompts the user for the length and thickness of

Code in C++

image text in transcribed

Create a new project in Code::Blocks and design and implement a program that prompts the user for the length and thickness of a cable. The program will simulate stretching the cable and applying tension. The program will display the tension applied to the cable and the length of the cable as it stretches until it breaks. The program will announce when the cable has broken. Prompt for the length of the cable in feet (must be a positive number) and the cable thickness in inches (from 0.1 up to 1.5) and validate the input. If invalid input is entered, explain the specific input value that is incorrect and prompt the user to enter it again. When valid input has been entered, use a loop in the program to increase the tension on the cable one (1) pound at a time from zero (0) pounds to the breaking point, and simulate stretching the cable. Output the values at each iteration of the loop The cable will stretch (its thickness 0.25 feet)for each pound applied, up to its' breaking point. The cable will break when its' length is 106% of the original length. The output will display the pounds of tension applied, and the current length of the cable each time an additional pound of tension is applied, and when the cable has broken

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

Advances In Databases And Information Systems Uropean Conference Adbis 2020 Lyon France August 25 27 2020 Proceedings Lncs 12245

Authors: Jerome Darmont ,Boris Novikov ,Robert Wrembel

1st Edition

3030548317, 978-3030548315

More Books

Students also viewed these Databases questions