请大神帮忙看下以下这个程序哪里出问题了???
条件:分段函数:
x<1:y=x;
1=<x<10:y=2x-1;
x>=10:y=3x-11
程序如下:
#include<stdio.h>
int main()
{
int x;
printf("input x:\n");
scanf("%d",&x);
printf("The value of 'Y' is : %d\n",(x<1)?x:((x>=10)?3x-11:2x-1));
return 0;
}
编译时显示:[Error] invalid suffix "x" on integer constant