Question: Write both in C++ and Python 5. (General math) Write, compile, and run a C++program to calculate the distance between two points with the coordinates
5. (General math) Write, compile, and run a C++program to calculate the distance between two points with the coordinates (7,12) and (3,9). Use the fact that the distance between two points with the coordinates (x1,y1) and (x2,y2) is given by this formula: distance =(x2+y2) After verifying that your program works correctly by calculating the distance between the two points manually, use your program to determine the distance between the points (12,15) and (22,5) Problem \#2 7. (Physies) The maximum height reached by a ball thrown with an initial velocity, v, in meters/sec, at an angle of is given by this formula: height =(.5v2sin2)/9.8 Using this formula, write, compile, and run a C++program that determines and displays the maximum height reached when the ball is thrown at 5mph at an angle of 60 degrees. (Hint: Make sure to convert the initial velocity into the correct units. There are 1609 meters in a mile.) Calculate the maximum height manually, and verify the result your program produces. After verifying that your program works correctly, use it to determine the height reached by a ball thrown at 7mph at an angle of 45 degrees
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
