Projectile motion. Write a C++ program .Prompt the user for an initial velocity
ID: 3649687 • Letter: P
Question
Projectile motion. Write a C++ program .Prompt the user for an initial velocity and an initial angle above the horizontal (0-90 degrees). Calculate the time of flight of a projectile with such initial conditions. (Assume no friction, constant g, etc.) Create two arrays x & y with 100 data points for the projectile's motion. Print a 3 column table with time, x, & y. The table should be appropriate for import into ExcelExplanation / Answer
#include #include #include using namespace std; const double PI = 3.141592654, g = -9.8; int main() { double launch_angle, Vo, Vx, Vy; cout Vo; }while ((Vo < 0) || (Vo > 100)); do { cout > launch_angle; }while ((launch_angle < 5) || (launch_angle > 85)); Vx = Vo * cos (launch_angle*PI/180); Vy = Vo * sin (launch_angle*PI/180); return 0; }Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.