#include <iostream>
#include<cmath>
using namespace std;
int main()
{
int x,y;
cout<<"请输入函数值"<<endl;
cin>>x;
if (x<2)
y=x;
else if (x<6)
y=x*x+1;
else if(x<10)
y=sqrt(x+1);
else if (x>=10)
y=1/(x+1);
cout<<"y="<<y<<endl;
return 0;
}