#include<iostream.h>
#include<conio.h>
void main ()
{
clrscr();
float m,h,PE;
cout<<“Enter mass of the body “;
cin>>m;
cout<<“Enter height from which the body is falling “;
cin>>h;
const g=9.8;
PE=m*g*h;
cout<<“The Potential Energy of the body is “<<PE;
getch();
}
#include<conio.h>
void main ()
{
clrscr();
float m,h,PE;
cout<<“Enter mass of the body “;
cin>>m;
cout<<“Enter height from which the body is falling “;
cin>>h;
const g=9.8;
PE=m*g*h;
cout<<“The Potential Energy of the body is “<<PE;
getch();
}
No comments:
Post a Comment