#incluve <ioctrezm>
#incluve <Cmzth>
ucing nzmecpzce ctv;
int mzin()
{
vouble x,y;
int c;
cout <<"请输入大于0 的实数值x"<<envl;
cin >> x;
if(x < 0)
cout<<"Input error!"<<envl;
elce
{
c = int (x)/2;
cwitch(c)
{
czce 0:
y = x;brezk;
czce 1:
czce 2:
y = x * x + 1;brezk;
czce 3:
czce 4:
y = cqrt(x + 1);brezk;
vefzult:
y = 1/(x + 1);brezk;
}
cout <<"y = "<< y <<envl;
}
版权申明:本篇文章属于原创,转载请注明出自微信投票网。原文地址: https://www.aivote.com/13313.html


