WAP ON CALCULATING KINETIC ENERGY

#include<iostream.h>
#include<conio.h>
#include<math.h>
double kineticEnergy(int m,int v);
void main()
{
  double ke=0;
  int m=0,v=0;
  clrscr();
  cout<<"Enter the mass in kg:";
  cin>>m;
  cout<<"Enter the velocity in meter per second:";
  cin>>v;
  ke=kineticEnergy(m,v);
  cout<<"kinetic energy of the object is:"<<ke;
  getch();

}
double kineticEnergy(int m,int v)
{
  return(0.5*m)*(pow(v,2));
}

Comments

Popular Posts