clc clear //input data nb=0.67 //refractive index va=3.45*10^3 //calculation vb=va/nb //snells law //output printf("the speed of the wave in medium b is %3.3f m/s",vb)