C语言编程题?

2024-11-26 12:35:25
推荐回答(2个)
回答1:

#include

#include

double f(double x)

{return x*x*x+x-1;

}

int main()

{ double x;

  scanf("%lf",&x);

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

  printf("f(5+x)=%f\n",f(5+x));

  printf("f(sinx)=%f\n",f(sin(x)));

  return 0;

}

回答2:

#define FUN_N(n) (n^n+n-1)//