if(x<1)
y=x;
else if(x>=1 && x <10)
y=2*x-1;
else if(x>10)
y=3x-11;
你用的编译器语言把scanf改成scanf_s
或者2在程序最前面加:#pragma warning(disable:4996)