# Write a program that reads numbers from an array and graphs the information in the form of a bar

Write a program that reads numbers from an array and graphs the information in the form of a bar chart or histogram. If the number is printed, then a bar consisting of that many asterisks is printed beside the number. Note: The defined size of the array is 10. See the example below.

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, and the last initial velocity is vfft/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(s – s0).
0 = v2 + 2ac(h – 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.

Solved By Verified
Study Co-Pilot

Instant