clear; x=input('请输入x的值:'); if x==10 y=cos(x+1)+sqrt(x*x+1); else y=x*sqrt(x+sqrt(x)); end disp(['y=',num2str(y)])