- Analyze the problem below and make a c++ program to enter on the keyboard the required
data for process. Compute the time of flight of a projectile and its height above the ground
when it reaches the target. Display all the inputed data and the processed or compute data.
Use the following givens:
G 32.17 /is the gravitational acceleration constant in feet per second fps/
Other Input:
theta / the angle of aim of the projectile with respect to the horizontal ground when it was
fired/
distance / distance of from the canon to the target/
velocity / starting velocity of the projectile in fps/
Expected Results:
time / time of flight of the projectile to reach its target/
height / how high the projectile above the target /
Useful C formula:
time = distance / (velocity cos (theta))
height = velocity sin(theta) time – (Gtime*time)/2
Ashley_31 0 Newbie Poster
Recommended Answers
Jump to PostPlease read Suggestions For Posting Questions.
Jump to PostSet up some variables (time, height, theta, distance, velocity), constant (g), user defined functions (time and height) and maths functions (sin, cos) then write the logic.
You have to do some work here. If you attempt something and work on it you will learn much more than someone else doing …
All 5 Replies
Reverend Jim 4,780 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
Dani 4,084 The Queen of DaniWeb Administrator Featured Poster Premium Member
wwwalker 49 Newbie Poster
shamuh2021 0 Expert Member
Olive34 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.