clear clc disp('Exa-2.1'); v1=60; v2=40 //Velocities of cars wrt to observer in km/hr vr=v1-v2; //relative velocity printf('The value of relative velocity is %4.f km/h.',vr);