注册 登录
编程论坛 VC++/MFC

求帮助,运行出错

sddzhh 发布于 2014-10-07 22:03, 452 次点击
#include <stdio.h>
#include <math.h>

int main(void)

{  
   
    double x,y;

printf("Enter x:");



scanf("%lf",&x);



if(x<0){  
   
   
   
    y=pow(x,5)+2x+(1/x) ;

}

else {  
   
    y=sqrt(x)  ; }

printf("y=f(%f)=%.2f\n",x,y);

return 0 ;


}
哪里错了??
1 回复
#2
embed_xuel2014-10-07 22:05
编译错了还是运行错了?
1