fork download
#include 
#include 
#include 

int main()
{
    int x=60; //x is the measure of angle in degrees.
    int V= 144; //Initial velocity
	double t= 0.5; //Seconds
	double h; // height
	

	std::cout <<  "Time" << '\t'
	<< "Height" << std::endl;
	while(t<=8.0)
	{
	    h = V*t*sin(x*M_PI/180)- 16*t*t;
	    std::cout <<  t << '\t' << h << std::endl;
	    t += 0.5;
	}
	return 0;
}
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
Time	Height
0.5	58.3538
1	108.708
1.5	151.061
2	185.415
2.5	211.769
3	230.123
3.5	240.477
4	242.831
4.5	237.184
5	223.538
5.5	201.892
6	172.246
6.5	134.6
7	88.9536
7.5	35.3074
8	-26.3387