#include
using namespace std;
int main()
{
int x,y;
cout<<"请输入x"<
if(x<1) {y=x;} //建议使用大括号
else if(x>=10) {y=3*x-11;} //是3*x, 不是3x,别把数学搬到计算机里
else {y=2*x-1;} //同上。其他错误都是有这几个错误连带所致
cout<<"y的值为:"<
//可在这里加入cout<
}
#include
using namespace std;
int main()
{
int x,y;
cout<<"请输入x"<
if(x<1) y=x;
else if(x>=10) y=3x-11; //改为 else if(x>=10) y=3*x-11;
else y=2x-1; //改为 else y=2*x-1;
cout<<"y的值为:"<
}