Second Equation Of Motion Calculation In C++

Coding:


#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
float vi,a,t;
cout<<"\n\t\t******The Second Equaction of Motion******"<<endl;
cout<<"\n\t\tEnter the Initial velocity vi = ";
cin>>vi;
cout<<"\n\t\tEnter the Accelaration a = ";
cin>>a;
cout<<"\n\t\tEnter the Time t = ";
cin>>t;
cout<<"\n\t\tS=vit+1/2(a*t*t)"<<endl;
cout<<"\n\t\tS="<<vi<<"*"<<t<<"+"<<"(1/2)"<<a<<"*"<<t<<"*"<<t<<endl;
cout<<"\n\t\tS="<<(vi*t)+(a*t*t)/2;
getch();
}

Share To:

Adeel Rasheed

Full Stack Website Developer

Post A Comment:

0 comments so far,add yours