clc p1=2; //bar C1=300; //m/s Q=0; h1=915*10^3; //J/kg h2=800*10^3; //J/kg C2=sqrt(2*[h1-h2 + C1^2/2]); disp("Relative velocity of gas leaving the pipe=") disp(C2) disp("m/s")