float x,y;
if(x<1) y=x;
else if(x>=10) y=3*x-1;
else y=2*x-1;
#include
using namespace std;
float function(float);
void main()
{
float x;
cout<<"Please input the value of parameter x:";
cin>>x;
cout<<"/ny="<
float function(float x)
{
if(x<1)
{
y=x;
}
else if(x>=10)
{
y=3*x-1;
}
else
{
y=2*x-1;
}
return y;
}