#include <iostream>
using namespace std;
int main()
{
double u, v, d, t,a;
cout<<"Enter the initial velocity u in metre per second: "<<endl;
cin>>u;
cout<<"\n";
cout<<"Your initial velocity in km per hour "<<u*3.6<<"\n";
cout<<"Enter the final velocity v in metre per second: "<<endl;
cin>>v;
cout<<"\n";
cout<<"Your final velocity in km per hour "<<v*3.6<<"\n";
cout<<"Enter time t: "<<endl;
cin>>t;
cout<<"\n";
cout<<"Your time in hour "<<t/3600<<"\n";
d=(u*3.6+v*3.6)*t/3600/2;
cout<<"Distance in km: "<<d<<""<<endl;
a=(v-u)/t;
cout<<"Acceleration in metre per second: "<<a<<endl;
system("pause");
}
Comments
Leave a comment