这个代码不会写,
#include<stdio.h>
#include<math.h>
int main()
{
int x = 0;
scanf("%d", &x);
if (x >= 0)
{
printf("%.2f", sqrt(x));
}
else
{
double k = 0.0;
k = pow((x + 1), 2) + 2.0 * x + 1.0 / x;
printf("%.2f", k);
}
return 0;
}