Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Exercise: Bridge Deflection The formula for calculating the deflection at a point on a particular bridge is: d=48EIWX[3L24X2] Where: d is the deflection. W

image text in transcribed
image text in transcribed
Programming Exercise: Bridge Deflection The formula for calculating the deflection at a point on a particular bridge is: d=48EIWX[3L24X2] Where: d is the deflection. W is the weight force. X is the distance from the closest support. E is Young's modulus of eiasticity (Use a value of 210 ). I is the area moment of inertia (Use a value of 500 ). L is the length of the bridge from one end to the other. Write a C++ program that prompts the user for the length of the bridge and the weight of the vehicle crossing the bridge. Your program will calculate and display the deflection at each foot from one end to the middle. COSC-1436, Lab Assignment 5 Submit your answers to the following questions in a word processing document that is compatible with Microsoft Word. The name of the file you initials. Questions ( 50 points): 1. Compose a C++ for loop that displays the even integer values starting with four and ending with sixteen. Provide all the code needed to execute your answer if it were included as part of a complete program. 2. Compose a C++ while loop that allows the user to enter a number. The number should then be multiplied by eight, and the result assigned to a variable named result. The loop should continue to repeat prompting the user to enter a number, multiplying it by seven and assigning the product to the variable named result if the value of result is less than 89 . 3. Compose the C++ code that prompts the user to enter a number in the range from 23 through 65 , validates the input, and then displays the validated entry. (Refer to section 5.3 for information and examples.) 4. Convert the C++ while loop in the following code to an equivalent C++ for loop: int count =5; while (count =55 ) { cout "The value of count is " count end 1 ; count = count +4; 5. How many times will the following loop iterate? for (int count =0,i=15; count =i; count +=2 ) cout "count =" count endl

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899