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 located in Canvas under Assignments.
Observe the usual guidelines regarding the initial comment section, indenting, and so on In addition,
Indent statements within loops.
points The height of a ball thrown upward at an angle A with initial velocity is given by the following formula:
Suppose in a given situation a table of values of time and height are to be printed in a table beginning at time and continuing at intervals of second until the ball reaches the ground. Define with a value of and PI with a value of
Prompt the user to input first the initial velocity va value between and 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 and 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 and height beginning at time and continuing at intervals of 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 digits after the decimal point for time and digits after the decimal point for height.
Test with initial velocity of and angle of launch of degrees.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
