summaryrefslogtreecommitdiff
path: root/3845/CH2/EX2.3/Ex2_3.sce
blob: ca88641f45c098b708bc75e31ba08471629874dd (plain)
1
2
3
4
5
6
7
8
9
10
//Example 2.3
displacement_a=+2;//Displacement in part (a) (km), See Example 2.2
distance_a=abs(displacement_a);//Distance traveled in part (a) (km)
printf('Distance travelled in part (a) = %0.2f km',distance_a)
displacement_b=-1.5;//Displacement in part (b) (km), See Example 2.2
distance_b=abs(displacement_b);//Distance traveled in part (b) (km)
printf('\nDistance travelled in part (b) = %0.2f km',distance_b)
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest