Question: Please create thr program in visual studios C + + . For each of the programs assigned below, submit the following: Hard copy of the

Please create thr program in visual studios C ++. For each of the programs assigned below, submit the following:
Hard copy of the source code.
Hard copy of sample executions (black or, preferably, white screen).
Copy of the source code (.c) saved as an electronic attachment Assignment 6 located in Canvas under Assignments.
Observe the usual guidelines regarding the initial comment section, indenting, and so on. In addition,
Indent statements within loops.
(4 points) The height h of a ball thrown upward at an angle A with initial velocity v0 is given by the following formula:
h=v0tsin(A)-12gt2
Suppose in a given situation a table of values of time t and height h are to be printed in a table beginning at time 0 and continuing at intervals of 0.12 second until the ball reaches the ground. Define g with a value of 9.81 and PI with a value of 3.14159.
Prompt the user to input first the initial velocity v0(a value between 10 and 40 meters per second inclusive), then use a data validation loop to insure that the initial velocity fall in the correct rang.
Then prompt the user to input the angle of launch (a value between 20 and 50 degrees inclusive), then use a second data validation loop to make sure that the angle is within the correct range. (NOTE: like in class, a data validation loop cannot be done with an if statement. It should continue to ask the user to input a value, until they enter a valid value.)
Print a labeled table of values of time t and height h, beginning at time 0 and continuing at intervals of 0.12? second until the ball reaches the ground. Inside a while loop calculate the height and print the values one line at a time within the loop, placing time in the column on the left and height in the column on the right. Do not print any negative values of height. Use 2 digits after the decimal point for time and 2 digits after the decimal point for height.
Test with initial velocity of 38ms and angle of launch of 42 degrees.
Please create thr program in visual studios C + +

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 Programming Questions!