Posted on

# 6 Write a program to determine the maximum height to which a projectile will travel if atmospheric

6. Write a program to determine the maximum height to which a projectile will travel if atmospheric resistance is neglected, for different initial velocities. This problem demonstrates the use of repetition controlled by a terminating limit.

Method:
The mass of the projectile is m, the initial velocity is v0 m/sec, the last initial velocity is vft/sec. From equations of motion: w=mg, Fz=maz. Applying these equations for the projectile results in the following equations: mg=mac gives ac=g.

Initial conditions: s0=0, v0=v.
Final conditions: sf=h, vf=0.

From Kinematics:
vf2=v02+2ac(sfs0)
0=v2+2ac(h0)

2ach=v2
h=2acv2

Data:
Real values of initial velocity at 50, 100, 150, and 200 ft/sec.
The real value of gravitational acceleration is 32.2 ft/sec2.

7. Write a program to compute and print a table of torsion shear stresses for circular rods having various torsion loads at various offsets. This problem demonstrates the use of nested repetitions.

Data:
Diameter: 5 and 6 inches.
Load: 1000 and 12,000 pounds.
Offset: 10, 15, and 20 L.

Method:
Let D = diameter of the rod.
P = torsion load in pounds.
L = offset.

The torsion shear stress is given by the formula Ts = D^3/(16PL).

8. Write a program that reads numbers from an array and graphs the information in the form of a bar chart or histogram. The number is printed first, and then a bar consisting of that many asterisks is printed beside the number.

Note:
The define size of the array is 10.

Example:
[Number]: **********
[Number]: *
[Number]: *********
[Number]: *****
[Number]: **********
[Number]: ****
[Number]: **
[Number]: *******
[Number]: ********
[Number]: *******

Solved By Verified
Study Co-Pilot

Instant
Download

Student review: