#include <stdio.h> #include <math.h> int main(){ double r; double x1; if (scanf("%lf",&x1)!=EOF){ if (x1>=0.0){r=pow(x1,0.5);} else{r=pow(x1+1,2)+2*x1+1/x1;} printf("f(%.2lf) = %.2lf",x1,r); }else{ printf("input wrong"); } return 0; }
c语言编程练习题:7-88 计算分段函数[2]
作者:yunjinqi
类别:编程
日期:2023-05-31 10:11:48
阅读:600 次
消耗积分:0 分
版权所有,转载本站文章请注明出处:云子量化, https://www.yunjinqi.top/article/213
最新文章
系统当前共有 404 篇文章