Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

C++ loops Here is my entry: Here is the error message that I am getting: 4.16 P04-02 Newton's Laws of Motion NOTE: There are two

C++ loops

image text in transcribed

Here is my entry:

image text in transcribed

Here is the error message that I am getting:

image text in transcribed

4.16 P04-02 Newton's Laws of Motion NOTE: There are two due dates for the assignment to allow for late submissions. The earliest due date on all Projects in these Zybooks is the actual due date (see syllabus if you ever have any doubts). The later due date on all Projects is for accepting late submissions submissions submitted less than or equal to 24 hours after the actual due date). Newton's laws of motion predict the (x,y) position of an object at time T, with an initial velocity V (in ft sec) and initial angle of movement A (in degrees). Ignoring friction, the equations are y-sin (A)VI - (1/2)gT 2 where g denotes the acceleration due to gravity, assume the constant g 321 74 ft/sec^2. For example, an American football thrown at an angle A of 40 degrees, with an initial velocity V of 88 ft/sec, is at position (134.824,48.7825) when time T 2 seconds. On an American football field, that's about 45 yards down the field, and 16 yards up in the air. Write a complete C++ program that inputs three values: the initial velocity V in ft/sec (a real number), the angle A in degrees (a real number), and the timestep (a real number), in this order. The program then computes the (x, y) position of the object at every timestep, starting at 0.0 seconds and stopping after 5.0 seconds. For example, suppose the inputs are the following angle and initial velocity 88.0 40.0 Your program should output the following values, where each line denotes the time T followed by the object's (x, y) position at T 0: (0, 0) 0.5: (33.706, 24.2609) 1: (67.4119, 40.4783) 1.5: (101.118, 48.6522) 2: (134.824, 48.7825) 2.5: (168.53, 40.8694) 3: (202.236, 24.9128) 3.5: (235.942, 0.912695) 4: (269.648,-31.1309) 4.5: (303.354,-71.218) 5: (337.06, -119.349) Note that C++ provides built-in cosine and sine functions, cos(R) and sin(R). However, these functions work in radians (not degrees), so you'll need to convert A to radians using R A * Pl / 180; define PI-314159. You'll also need to include the header file to gain access to the cos(R) and sin(R) functions Assume all input values are valid, i.e. are positive real numbers PROGRAMMING INSTRUCTIONS Zyante contains a complete C++ programming environment, so you are free to work here. Zyante provides 2 modes: "Develop" and Submit. In Develop mode, you supply the input values in the text field provided, then click Run program to run your program and see the output. This gives you a chance to develop and test your program as you see fit

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Students explore these related Databases questions

Question

1. VTTs vision, values and strategy.

Answered: 3 weeks ago