C语言程序设计,计算下列分段函数.
来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/11/01 07:23:34
C语言程序设计,计算下列分段函数.
计算下列分段函数.
f(x,y)= 2x2+3x+1/(x+y ) (x>=0,y>0)
f(x,y)=2x2+3x+1/(1+y2 ) (x>=0,y
计算下列分段函数.
f(x,y)= 2x2+3x+1/(x+y ) (x>=0,y>0)
f(x,y)=2x2+3x+1/(1+y2 ) (x>=0,y
int main(){
\x09double x=0,y=0;
\x09printf("x=");
\x09scanf("%lf",&x);
\x09printf("y=");
\x09scanf("%lf",&y);
\x09if(x>=0&&y>0)
\x09\x09printf("x=%f,y=%f,f(x)=%f",x,y,(2*x*x+3*x+1/(x+y)));
\x09else if(x>=0&&y
\x09double x=0,y=0;
\x09printf("x=");
\x09scanf("%lf",&x);
\x09printf("y=");
\x09scanf("%lf",&y);
\x09if(x>=0&&y>0)
\x09\x09printf("x=%f,y=%f,f(x)=%f",x,y,(2*x*x+3*x+1/(x+y)));
\x09else if(x>=0&&y