# include <iostream>
# include <cmath>

using namespace std;

int main() {

	double z0,v0,alpha,zt,t=0.0,rt;
	const double pi = 3.1459;
	const double g = 9.81;
	
	//Input statements
	cout<< " Enter the initial height: ";
	cin>>z0;
	cout<<"\n Enter the initial velocity: ";
	cin>>v0;
	cout<<" \n Enter the muzzle angle: ";
	cin>>alpha;
	// conversion of angle into radians
	alpha = alpha*pi/180;
	// Intialize Zt to be z0, this is the initial height when t =0.0
	zt = z0;
	cout<< "Time" << "\t"<<"Distance" <<"\t"<< "Height" <<endl;	
	while(zt > 0.00) {
		cout<<"\n"<<endl;
		rt = v0*cos(alpha)*t;
		zt = (-0.5*g*pow(t,2))+ (v0*sin(alpha)*t)+z0;
		cout<< t << "\t"<<rt <<"\t"<< zt <<endl;
		t = t+0.01;
	}

	return 0;

}


		
	
