
c语言运行后输入负数出现-1.#IND00是怎么回事? 5
#include<stdio.h>#include<math.h>voidmain(){floatx,y;printf("inputx:");scanf("%f",&x)...
#include <stdio.h>
#include <math.h>
void main()
{
float x,y;
printf("input x:");
scanf("%f",&x);
if (x<0)
{
y=sqrt((x+1),2)+2*x+pow(x,-1);
}
else
{
y=pow(x,0.5);
}
printf("y=%f",y);
} 展开
#include <math.h>
void main()
{
float x,y;
printf("input x:");
scanf("%f",&x);
if (x<0)
{
y=sqrt((x+1),2)+2*x+pow(x,-1);
}
else
{
y=pow(x,0.5);
}
printf("y=%f",y);
} 展开
若以下回答无法解决问题,邀请你更新回答
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |