Question: This question needs to be done with c++. Thanks. Baseballs can be thought of as projectiles, which leave the bat with a given velocity (given

 This question needs to be done with c++. Thanks. Baseballs can

This question needs to be done with c++. Thanks.

Baseballs can be thought of as projectiles, which leave the bat with a given velocity (given in MPH) and launch angle (given in degrees). An approximation for the range of a projectile, ignoring air resistance (drag), is the equation d=gv2sin(2) where d= distance traveled, v= launch velocity, theta = launch angle, and g is the acceleration due to gravity (approximately 32.17405ft/s2 ) Create a pair of parallel arrays - that is, arrays such that value array1 [1] and value array 2 [1] (the same index) go together. The first array should hold launch velocities (given here in MPH) for 8 baseball hits: 103, 102, 105, 104, 101, 100, 106, 99 The second array should hold launch angles (given here in degrees) for the same 8 hits: 12, 11, 10, 24, 11, 12, 27, 10 Use a for loop to iterate through the 8 baseball hits and for each one calculate (and print to the console) the estimated distance the ball flew. Given that home runs must travel a minimum of 350ft (longer in some ball parks), mark any distances that might be a home run with a * Remember that sin in C++ requires angles in radians, so convert your launch angle this way: angle_rad = angle_deg * M_PI/180.0 Also note that g is given in units of feet and seconds but v is given in MPH. Convert v this way: vfpf=vmph1.46667 As always, upload your code and a screenshot of your output here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!