blob: 83a644bfe78249bb7e7e6658b2b3fab30169d8c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
//Example 7.1
F=75;//Force (N)
d=25;//Horizontal distance traversed (m)
theta=35;//Angle (deg)
W=F*d*cosd(theta);//Work (J)
W1=W/4184;//Work (kcal)
printf('Work done = %0.2e J or %0.3f kcal',W,W1)
ratio=W1/2400;//Ratio of work done to the daily consumption
printf('\nRatio of work done to the daily consumption = %0.2e',ratio)
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest
|