Question: please attach the screenshot of the code Write a C++ program that displays a table of x and y values for a projectile fired with

please attach the screenshot of the code

Write a C++ program that displays a table of x and y values for a projectile fired with an initial velocity of 500 ft/sec at an angle of 22.8 degrees. The table should contain values corresponding to the time interval 0 to 10 seconds in increments of 1/2 seconds.

The x and y coordinates, as a function of time t of a projectile fired with an initial velocity v, at an angle of ? degress with respect to the ground, are given by these formulas:

x = v t cos ?

y = v t sin ?

Note. The library functions sin and cos take only radians, convert degrees to radians before calling the functions.

2. Modify the code to prompt for the velocity and the angle in degrees. The program should answer the question, how far does the projectile go (i.e. when y-coordinate becomes zero, x-coordinate is the distance traveled) and how long it took to travel (i.e. when y-coordinate becomes zero, t is the time of travel). In other words, run the loop long enough until y-coordinate becomes less than or equal to zero.

Include a comment with your name, course code and date.

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!