Third Equation Of Motion Calculation In C++

Coding:


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


Share To:

Adeel Rasheed

Post A Comment:

0 comments so far,add yours