Answer to Question #255633 in C++ for Myynnnee

Question #255633

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 = (.5 × v2 × sin2 θ) / 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 5 mph 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 7 mph at an angle of 45 degrees.


1
Expert's answer
2021-10-24T00:40:20-0400
#include<iostream>
#include <cmath>
using namespace std;
int main()
{
	double x,v;
	cout<<"Enter the degrees: ";
	cin>>x;
	cout<<"Enter the velocity: ";
	cin>>v;
	double m=sin(x);
	double q=0.5*v*m*1609*m;
	double y=q/9.8;
	cout<<"The maximum height reached by the ball is: "<<y;
}

Height reached is: 416.063


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS