Originally Posted by

**john.c**
The answer should be in feet, not miles per hour.

You need to convert the given miles per hour into feet per second.

You need to convert the angle in degrees to the angle in radians (because the C library sin function takes radians).

So I think this is correct. The 32 is the acceleration due to gravity (g) in feet per second per second.

v = 50 miles per hour

angle = 20 degrees

fps = v * 5280 / 3600 = 73.333 fps

rad = angle * pi / 180 = 0.3491 rads

R = fps * fps / 32 * sin(2 * .3491) = 108.032 feet

How do I write that in C++? Like this?:

Code:

#include<iostream>
#include<cmath>
constant double g=9.8;
int main()
{
double velocity=12;
cout<<"Enter a velocity?";
cin>>velocity;
double v=v*5280/3600
double rad= theta* m.PI/180