1 2 3 4 5 6 7 8
// calculate the Volume and relative error clc; L=250; d=50; V=((%pi/4)*d^2)*L; disp(V,'Volume(mm3)=') Re=2*0.2-0.5; disp(Re,'Relative error (%)=')