Ball

Published on February 2017 | Categories: Documents | Downloads: 79 | Comments: 0 | Views: 710
of 1
Download PDF   Embed   Report

Comments

Content

#include <iostream>
using namespace std;
int main()
{
double g=9.81;//acceleration due to gravity
cout<<"Input the initial velocity (m/s):> ";
double v0;
cin>> v0 ;
cout<< " Input the time (s):> ";
double t;
cin>> t;
cout<<
<<
cout<<
<<

"==========================="//
endl;
"The velocity at time " <<t<< " is "
v0 - g*t <<endl;

cout<< "and the height is "
<< v0*t - (g*t*t)/2 << endl;
return 0;
}

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close