Unformatted text preview: cannonball is gravity with an acceleration of a y = 9.8 m/s. θ y x y Figure 1 Write a C++ program, which obtains user inputs for y (m) v (m/s) and θ (degrees) and outputs both the time (s) and horizontal distance (m) the cannonball travels before hitting the ground (y = 0 m). Note that trigonometric functions in C++ are computed in radians not degrees! Do not forget that you may lose marks for poor style. Read the notice on the Assignment page on the website!...
View Full Document
- Spring '10
- Trigonometry, horizontal distance, Cannonball, Department of Systems and Computer Engineering