分类: IT职场
2014-12-01 12:00:43
#include
int main()
{
float x,y;
scanf("%f",&x);
if(x<1)
{
y=x;
printf("%f\n",y);
return 0;
}
else if(x>=1 && x<10)
{
y=2*x-1;
printf("%f\n",y);
return 0;
}
else if(x>=10)
{
y=3*x-11;
printf("%f\n",y);
return 0;
}
return 0;
}
如图: