You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This C++ program calculates the maximum height a ball will reach when thrown vertically upward with a given initial velocity. The program uses the standard equation of motion derived from basic physics:
h
=
v
2
2
g
h=
2g
v
2
where:
1. h is the maximum height (in meters),
2. v is the initial velocity of the ball (in meters per second), and
3. g is the acceleration due to gravity (9.8 m/s² on Earth).
The user inputs the initial velocity, and the program computes and displays the corresponding maximum height.
This program helps understand the relationship between velocity and height in projectile motion under uniform gravity.
0 commit comments