//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)