Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

Describe the types of power that effective leaders employ

Answered: 1 week ago

Question

Describe how leadership styles should be adapted to the situation

Answered: 1 week ago