> 其他 >
有一分段函数如下:X>0时,Y=X^2+2X+1,X=0是,Y=-7,X
人气:291 ℃ 时间:2020-02-03 23:06:37
解答
#include
#include
float fun(int p){
float q;
if(p>0)
q=p*p+2*p+1;
else if(p==0)
q=-7;
else
q=3*p-5;
return q;
}
int main(){
float x,y;
coutx;
cout
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版