1 2 3 4 5 6 7 8
//chapter 6 Ex 15 clc; clear; close; s1=84; s2=56; avgSpeed=(2*s1*s2)/(s1+s2); printf("The average speed of train is %1.1f km/hr",avgSpeed);