blob: ce8808a011d4745055acbf2e1d7a386f2533eb02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
//Given that
h = 0.8 //in meter
l = 2.0 //in meter
m = 2 //in kg
g = 9.8 //in m/s^2
//Sample Problem 8-1
printf("**Sample Problem 8-1**\n")
//Using the definition of
Wg = m* g* h
printf("The work done by the gravity is %eJ", Wg)
|